Rewrite Proxy not working

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 17 Oct 2012, 14:35

Rewrite Proxy not working

17 Oct 2012, 14:40

Hi i have a website that needs to be redirected to another site without the URL getting changed.
I have a website say abc.com that needs to redirect to xyz.com but the URL should stay as abc.com
I am using ISAPI_Rewrite.
Here is the Condition i have put in the .htaccess file of the website
RewriteProxy ^/(/.*)?$ http\://xyz\.com$1 [NC,U]

But when i browse abc.com i am getting a "The Page cannot be found"

But RewriteRule ^/? http://xyz\.com/? [R=301,NC,L] is working fine. But with this the URL changes. So i am looking at RewriteProxy.

Any help is appreciated.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewrite Proxy not working

17 Oct 2012, 17:22

hello,

try using the following:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteRule (.*) http://xyz\.com/$1 [NC,P,L]


In case it won't work, please, provide the rewrite.log for a testing request. Logging issues described in FAQ

Regards
Andrew

User avatar
Posts: 2
Joined: 17 Oct 2012, 14:35

Re: Rewrite Proxy not working

17 Oct 2012, 18:17

Thanks it worked.

But can you explain me the significance of the Flags that you have used.

Also this works fine for a server which has the version # Version 3.1.0.95 but if i apply this rule to another site(another server) which has version # Version 3.1.0.88 is not working. Any thoughts on this?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Rewrite Proxy not working

17 Oct 2012, 20:46

The flags are all the same. Everything regarding flags is described here - RewriteRule directive

The rule must work in .88 build also, I can tell you right away why it's not working... each case must be described and investigated separately.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 6 guests