谁能帮我这个?
RewriteCond %{REQUEST_URI} !^\/index\.php$
RewriteCond %{REQUEST_URI} !^\/search\/.*
RewriteCond %{REQUEST_URI} ^\/([^/]*)\.php$
RewriteRule (.*) http://www.mydomain.com/index.php?page=$1
我需要将其转换为 nginx
我试过这个,但它不起作用:
if ($request_uri ~* !^\/search\/.*) {
if ($request_uri ~* !^\/index\.php$) {
if ($request_uri ~* ^\/([^/]*)\.php$) {
rewrite (.*) http://www.mydomain.com/index.php?page=$1;
}
}
}