我正在将网站从具有 Apache 网络服务器的服务器迁移到另一台运行 Nginx 网络服务器的服务器,并且我想转换 .htaccess 文件,问题不仅在于语法,还在于文件名,是它还有 ".htaccess"或者是什么?
最佳答案
这是我使用的一个工具:
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
它不是 100% 准确,但它是相当好的基础
另外,这里有一个关于转换规则的链接:
http://nginx.org/en/docs/http/converting_rewrite_rules.html
这个可以帮助一点:
http://wiki.nginx.org/HttpRewriteModule#rewrite
编辑:
文件名应该是 nginx.conf
关于apache - 更改 Apache .htaccess 文件以与 Nginx 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8711678/