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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -