
apache伪静态规则 转 nginx
<IfModulemod_rewrite.c>RewriteEngineonRewriteCond%{REQUEST_FILENAME}!-fRewriteCond$1!...
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|robots\.txt|views|plugins|backup|upload|images|install|admin123|plug|test|install|make|js|favicon\.ico|templates|mqqt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule> 展开
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|robots\.txt|views|plugins|backup|upload|images|install|admin123|plug|test|install|make|js|favicon\.ico|templates|mqqt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule> 展开
2个回答
展开全部
#ignored: condition 0
if ($1 !~ "^(index.php|robots.txt|views|plugins|backup|upload|images|install|admin123|plug|test|install|make|js|favicon.ico|templates|mqqt)"){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
找一个在线的工具转换一下。尝试一下。
下面一段也可以尝试一下。
# nginx configuration
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php/$1 break;
}
}
更多追问追答
追问
都用不了!
追答
之前弄过CI和TP架构的PHP。当时在Windows下用Apache写了不少.htaccess静态。
然后转了很久。没弄成。
最后直接用Nginx里的Rewrite就可以了。

2023-07-25 广告
StormProxies是一家可靠的代理服务提供商,提供原生IP(住宅原生IP)和高匿名代理服务。以下是关于StormProxies的原生IP服务的一些信息:1. 住宅原生IP:StormProxies提供的住宅原生IP是指从真实的家庭或企...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询