我有一个加载www.example.com默认index.php page. 我也有一个login.php,我已经为它设置了这个重写规则。
一切正常,但是当我尝试访问它时,www.example.com它会将我重定向到login.php.
我想在不影响默认页面的情况下保留规则。请看下面。如果有人有任何想法那就太好了。
# ensure permalink when url rewriting was enabled (login.php?r=content/perma&id=6 => /content/perma/?id=6
RewriteCond %{QUERY_STRING} ^r=content(/|%2)perma&id=([0-9]*)$
RewriteRule ^login\.php$ %{REQUEST_URI}/content/perma/?id=%2 [R=302,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
# Sets the HTTP_AUTHORIZATION header removed by apache
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/login.php [L]
慕码人8056858