snappel
Oct 26th, 2006, 06:12 AM
Ok, a bit of longshot this one, but here goes...
I have a site hosted on my web space account, for example www.somehosting.com/mysite/home.php. I also have a domain name that I want to use for the site, e.g. www.properdomain.com. At the moment properdomain.com points to www.somehosting.com/mysite/home.php
What I need to do is mask it properly so that properdomain.com/ = somehosting.com/mysite/
This is so that the links on my site are www.properdomain.com/links.php, etc, rather than www.somehosting.com/mysite/links.php.
I've tried using htaccess but I can't quite do it. Well, I did it once using mod rewrite, setting up a rewrite condition for if the pages are accessed from www.properdomain.com...
e.g. RewriteRule properdomain.com/.*$ http://www.somehosting.com/mysite/$1
For a while this worked, and you could access my pages using either domain. Then it suddenly stopped, and the issue seems to be that if the webserver receives a request for www.properdomain.com/links.php, it sees the 'properdomain.com' but and automatically redirects to the homepage (where the domain is 'pointed' to in the domain name settings). In short, the htaccess seems to be ignored.
Any ideas anyone?
I have a site hosted on my web space account, for example www.somehosting.com/mysite/home.php. I also have a domain name that I want to use for the site, e.g. www.properdomain.com. At the moment properdomain.com points to www.somehosting.com/mysite/home.php
What I need to do is mask it properly so that properdomain.com/ = somehosting.com/mysite/
This is so that the links on my site are www.properdomain.com/links.php, etc, rather than www.somehosting.com/mysite/links.php.
I've tried using htaccess but I can't quite do it. Well, I did it once using mod rewrite, setting up a rewrite condition for if the pages are accessed from www.properdomain.com...
e.g. RewriteRule properdomain.com/.*$ http://www.somehosting.com/mysite/$1
For a while this worked, and you could access my pages using either domain. Then it suddenly stopped, and the issue seems to be that if the webserver receives a request for www.properdomain.com/links.php, it sees the 'properdomain.com' but and automatically redirects to the homepage (where the domain is 'pointed' to in the domain name settings). In short, the htaccess seems to be ignored.
Any ideas anyone?