【发布时间】:2013-03-27 20:23:13
【问题描述】:
我在 appache 上设置了 https://github.com/lencioni/SLIR。它有一个 htaccess 文件并且运行良好。现在我已经搬到 Nginx 并希望 SLIR 以同样的方式工作。以下是我需要转换的内容。
# Prevent other scripts from interfering with SLIR
php_value auto_prepend_file none
php_value auto_append_file none
# Pretty URLs
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [S=40]
RewriteRule . index.php [L]
</IfModule>
# Prevent viewing of the error log file in its default location
<Files slir-error-log>
Order Deny,Allow
Deny from All
</Files>
我能够转换除以下行之外的所有内容
RewriteRule ^.*$ - [S=40]
有什么想法吗? 谢谢
【问题讨论】:
-
这个问题最好在superuser.com上问
标签: .htaccess mod-rewrite nginx