那里的htaccess大师的快速提问。
如何将此.htaccess文件转换为nginx?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
答案 0 :(得分:1)
使用您的其他规则在location /
指令中试用此规则。
location / {
rewrite ^(.*)$ index.php?url=$1 last;
}
然后重新加载或重新启动服务器。