Hi folks,
I’m having a hard time figuring out the solutions for my scenario which is as follows.
I have 1 hosting account with a site that’s a website builder (built using MODx revolution).
It’s located at subdomain.domain.com
subdomain.domain.com isn’t actually a sub-domain in the sense that it has it’s own folder under domain.com. It has it’s own cPanel hosting account and it’s just parked on domain.com.
Once a site has been created using this website builder I can associate any domain those resources and it will act as a separate site.
Unfortunately, the website builder & all of it’s created sites use the same hosting space and therefore the same .htaccess file.
I have is this:
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(.)$ [NC]
RewriteRule ^(.)$ “http://www.%1/$1” [L,R=301]
Which works great for adding the “www.” to any of my created sites
BUT
It’s also adding www. to my website builder.
ie http://www.subdomain.domain.com
what I need is the website builder to stay "http://subdomain.domain.com "
but all of my created sites to append the www. prefix if it’s missing.
I’m pretty new to the mod_rewrite thing and this is making my head hurt :injured:
Any help would be greatly appreciated!