- Code: Select all
RewriteEngine on
<Files 403.shtml>
order allow,deny
allow from all
</Files>
RewriteCond %{HTTP_HOST} ^([a-z.]+\.)?mydomain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .? http://www.%1mydomain.com%{REQUEST_URI} [R=301,L]
Now the issue is that my two sub-domains, http://sitebuilder.mydomain.com/ redirects to http://www.sitebuilder.mydomain.com/ and http://webdesigning.mydomain.com/ redirects to http://www.webdesigning.mydomain.com/.
You can notice it adds "www" which is not what I intend to get. I will appreciate any help.