【发布时间】:2015-02-06 11:58:59
【问题描述】:
我是 nginx 新手,但我正在尝试转换
# Disallows file browsing
Options -Indexes
# Custom Error Pages
ErrorDocument 403 /error-docs/403.php
ErrorDocument 404 /error-docs/404.php
ErrorDocument 500 /error-docs/500.php
# Turn on the Apache Rewrite Engine
RewriteEngine On
#Conditional to see if it is a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# If not then pass the query string to index.php and stop any further rules
RewriteRule (.*) index.php/$1 [PT,L]
到 nginx 语法。我已经在Routing requests through index.php with nginx 尝试过这个建议,但它并不能完全满足我的需要。我也尝试过自动转换器http://winginx.com/en/htaccess 和http://www.anilcetin.com/,但它们输出的规则对我也不起作用。任何帮助表示赞赏。
【问题讨论】: