Why does my rule always redirect even though I put [L]?
Here's my .htaccess
RewriteEngine on
RewriteRule .* index.php?url=$0 [L]
And my index.php file:
<?php
var_dump($_GET);
When I go to mysite/cat I get:
array
'url' => string 'index.php' (length=9)
Which suggests that it redirects twice, and index.php is开发者_JAVA百科 getting stuffed into url. I thought [L] was supposed to prevent that?
The Lflag does prevent further RewriteRules from being applied for the current request, but if an external redirect occurs then the entire set of rules will be re-entered from the top again regardless.
加载中,请稍侯......
精彩评论