apache - what's the rewrite rule meaning? -
rewriteengine on rewriterule ^(.*)$ http://$1 [r=301,l]
what's meaning of line ( rewriterule ^(.*)$ http://$1 [r=301,l] ). thank you.
it's 301 (permanent) redirect whatever path on relative domain name:
http://<your website>.com/example.com
redirect http://example.com
.
rewriterule ^(.*)$ http://$1 [r=301,l]
it literally saying, "ok, found in folder should considered permanently redirected domain".
^(.*)$
means select , call $1http://$1
means go domain stored in $1r=301
refers status code 301, "permanently moved" redirect.- l means final instruction matching pattern. no other redirect rule after 1 effect these redirects.
Comments
Post a Comment