不知道怎麼把apache rewrite 規則轉換成nginx rewrite配置的童鞋有喜啦。
一個自動化的linux命令行工具apache2nginx
能將apache的配置文件轉換成相應的nginx的配置文件。 源代碼在github上,文檔,二進制文件也可以從github上獲得。
使用方法:apache2nginx -f /etc/httpd/conf/httpd.conf 將生成 nginx.conf
https://github.com/nhnc-nginx/apache2nginx
另外一個選擇是在線直接生產。
也可以使用在線轉換工具把配置文件httpd.conf自動轉換成nginx配置文件nginx.conf,規則轉換網址
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/