Domain to Domain Redirect

Using a single web hosting account to host multiple sites

Domain to Domain Redirect

Postby david64 » Thu Apr 24, 2008 9:48 am

I have searched the forum, but can't find an answer for this one. I'm not sure if its even possible.

I have a scripts which runs from: http://mydomain.com/blog/

This script gives a different output for different domains that are registered to my script. However, I have one domain, which for some reason I can't transfer or change the nameservers for. I was hoping I could force this to work from my script using .htaccess but have had no success.

I have setup the following rule for my troublesome domain:
Code: Select all
RewriteRule ^(.*)$ http://mydomain.com/blog/$1 [NC,P,L]


This works, however. It gives me an output from mydomain.com and not my troublesome domain.

Is there any way using .htaccess that I can forward my domain to run from http://mydomain.com/blog/, but at the same time make my script think it is actually running from my troublesome domain.
david64
 
Posts: 15
Joined: Wed Mar 26, 2008 2:16 pm

Postby richardk » Thu Apr 24, 2008 1:11 pm

You can't, the proxy request is like a browser request for mydomain.com/blog.

You either need to change the script to look for proxy headers or you could try setting up a sub domain (that the script understands as different to mydomain.com) and proxying to that.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 2 guests

cron