Mod_Rewrite problem with sub-domains.

Using a single web hosting account to host multiple sites

Mod_Rewrite problem with sub-domains.

Postby phpsoft » Tue Mar 02, 2010 9:32 pm

I set up a Mod_Rewrite on my main account and this is the code:
Code: Select all
RewriteEngine on

<Files 403.shtml>
order allow,deny
allow from all

RewriteCond %{HTTP_HOST} ^([a-z.]+\.)?mydomain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .?{REQUEST_URI} [R=301,L]

Now the issue is that my two sub-domains, redirects to and redirects to

You can notice it adds "www" which is not what I intend to get. I will appreciate any help.
Posts: 4
Joined: Wed Oct 14, 2009 7:15 am

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 4 guests