alternate domain = new rewrite not working with existing one

Using a single web hosting account to host multiple sites

alternate domain = new rewrite not working with existing one

Postby raisinlove » Wed May 04, 2005 11:08 am

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]
raisinlove
 
Posts: 8
Joined: Thu Aug 19, 2004 2:54 am

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 33 guests

cron