Domain Rewriting

Topics: Developer Forum, User Forum
May 13, 2007 at 6:07 AM
Hi,

I am looking for a rewrite rule that will effectively redirect the user's request to a different url. For example, the user requests:

http://site1/whatever.etc

But then is redirected to here:

http://site2.domain.com/whatever.etc

And the crucial thing is, that in their browser address, the url has also changed to http://site2.domain.com/whatever.etc

Is this possible with IIREF? I have been playing around for the last hour, but not making a lot of progress. Any help would be much appreciated.

Cheers.
May 31, 2007 at 11:34 AM
Edited May 31, 2007 at 11:35 AM
RewriteCond %{HTTP_HOST} ^site1$ [I]
RewriteRule ^/(.*) http://site2.domain.com/$1 [I,RP]