wordpress - Why does a redirectPermanent after a Last RewriteRule works? -


with .htaccess file:

# begin wordpress <ifmodule mod_rewrite.c>     rewriteengine on     rewritebase /     rewriterule ^index\.php$ - [l]     rewritecond %{request_filename} !-f     rewritecond %{request_filename} !-d     rewriterule . /index.php [l] </ifmodule> # end wordpress  redirectpermanent /test/ /test2/ 

this url http://www.example.com/test/ should first pass through wordpress dispatcher's rewriterule , stop @ . /index.php [l] because of [l].

so why redirectpermanent condition after working ? when enter previous url i'm redirected http://www.example.com/test2/.

how apache handle kind of redirection ?

based on @hjpotter92 comment.

the [l] flag affects rules set mod_rewrite.

redirectpermanent depends on mod_alias therefore not affected [l] flags put on mod_rewrite rules.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -