Domain re-pointing

Using a single web hosting account to host multiple sites

Domain re-pointing

Postby syrus » Wed Feb 09, 2005 3:34 pm

I've managed to set up a rewrite rule to repoint some of my domains (2 webservers on the network, only one incomming, external port 80). This seems to work fine (with some entries in the hosts file to maintain HTTP_HOST information). However, there seems to be an error in my rewrite rule that is stopping images and CSS from working on two of the domains.
At first I realized that the rule I had in place would not remember/forward the information after the domain name, and changed the code to accomodate that. Then it totally stopped working for the 2 domains while working for 1.

My Condition/Rule is:

RewriteCond %{HTTP_HOST} domain.com$
RewriteRule /(.*)$ http://www.domain.com/ [P,L]

The above allows my PHP index to be displayed but doesn't show any images or CSS from the same domain. I'm thinking this is because of a problem with directories, as my images and CSS are in a theme directory and for the most part the PHP is in the root directory.


Any help would be great. Thanks.
syrus
 

works now...

Postby syrus » Thu Feb 10, 2005 2:49 am

I found a solution from asking on another forum.

It appeared that the initial webserver queried (windows) would add it's DocRoot before forwarding, hense trying to access a location that didn't exist on the second webserver (linux - Fedora C2).

Changing the RewriteRule to ^E:/Web/docroot/(.*)$ solved the problem.
syrus
 


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 111 guests

cron