![]() |
[solved] How to redirect all request to www. url?
I have 3 domains pointing on the same forum.
I want all of the 3 domain's will use www version. Thanks ! |
use rewriterule to do it
RewriteCond %{HTTP_HOST} domain1.com [OR] RewriteCond %{HTTP_HOST} domain2.com [OR] RewriteCond %{HTTP_HOST} domain3.com RewriteRule (.*) http:///www.domain.com/$1 [R=301,L] |
Quote:
I want them to force www. version. Like. domain.net will redirect to www.domain.net domain.me will redirect to www.domain.me domain.info will redirect to www.domain.info Not to redirect theme all to a single www url. |
I'm using this before:
Quote:
Or I should remove: Options +FollowSymLinks RewriteBase / |
base on your description, it looks what you want is:
RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\.net$ [NC] RewriteRule ^(.*)$ http://www.domain.net/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^domain\.me$ [NC] RewriteRule ^(.*)$ http://www.domain.me/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^domain\.info$ [NC] RewriteRule ^(.*)$ http://www.domain.info/$1 [R=301,L] |
It works now :)
Your the man ! So no need for this codes: Options +FollowSymLinks RewriteBase / ? |
as long as it's working now, no need those extra 2 lines.
|
| All times are GMT -7. The time now is 02:58 PM. |