Hi,
My host offers "alternate" domains, which consists of domains pointing to a subfolder on existing websites. i.e.:
www.newdomain.com points to www.mainsite.com/newdomain.com/
For this feature to work, the subfolder MUST be named like the new domain.
What I want to do now is rewrite the url so that it point to files in another folder. (i.e.: www.mainsite.com/~newdomain/)
I created the htaccess file and placed it within:
www.mainsite.com/newdomain.com/.htaccess
So if I enter this "real" url, the htaccess file works:
http://www.mainsite.com/newdomain.com/foo.html
But if I use the following url, the htaccess file stops working:
http://www.newdomain.com/foo.html
I suspect that this is an intentional result by the webhost to prevent account reselling, because that's exactly what I'm attempting.
Maybe there's a workaround? Here is my htaccess file:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.newdomain.com$ [NC]
RewriteRule ^(.*)$ http://www.mainsite.com/~newdomain/$1 [L]