0
What this rule is doing exactly?
RewriteCond %{HTTP_HOST} ^(www\.)?website\.com\.br$
RewriteRule . - [E=REWRITEBASE:/]
0
What this rule is doing exactly?
RewriteCond %{HTTP_HOST} ^(www\.)?website\.com\.br$
RewriteRule . - [E=REWRITEBASE:/]
1
The line of RewriteCond
is a condition for the execution of the next line
The line of RewriteRule
creates a variable with the name REWRITEBASE
and value /
, you can access it using %{ENV:REWRITEBASE}
. Example of use:
RewriteCond %{HTTP_HOST} ^(www\.)?website\.com\.br$
RewriteRule . - [E=REWRITEBASE:/website]
RewriteCond %{HTTP_HOST} ^(www\.)?other\.com\.br$
RewriteRule . - [E=REWRITEBASE:/other]
RewriteRule ^(.*)$ %{ENV:REWRITEBASE}/$1
This way you can split hosting into folders for each registered domain
Browser other questions tagged htaccess mod-rewrite rewrite-url
You are not signed in. Login or sign up in order to post.
I think it arrow the base of the URL, in your case, to
/
when the domain is that of the condition– Costamilam
But then it wouldn’t be
RewriteBase /
?– Ivan Ferrer