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
Post a Comment