1
如何转换这种重写代码:重写htaccess的阿帕奇nginx的
RewriteCond $1 !^(index\.php|static|favicon\.ico|robots\.txt|sitemap.xml|google(.+)\.html)
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
这是Stikked脚本https://github.com/claudehohl/Stikked/blob/master/htdocs/.htaccess
我试图去模仿它nginx的格式,但得到的错误变量$1
是不明
if ($1 !~ "^(index.php|static|favicon.ico|robots.txt|sitemap.xml|google(.+).html)"){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite ^/(.*)$ /index.php?/$1 last;
}
谢谢!非常 –