【发布时间】:2020-06-03 02:31:58
【问题描述】:
如何将此 .htaccess 转换为 NGINX?
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /404error.php [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
我试过了:
location / {
try_files $uri $uri/ /index.php?$args;
}
但总是当我点击另一个链接到另一个地址时,它会触发下载一个名为download的文件
这是一个普通网址的例子
http://forum.example.net/index.php?/discover/
应该如何:
http://forum.example.net/discover/
我正在使用 ipboard v4.4.10
【问题讨论】: