Rewrite Proxy not working
4 posts
• Page 1 of 1
- NiranjanKC
-
- Posts: 2
- Joined: 17 Oct 2012, 14:35
Rewrite Proxy not working
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.
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.
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Rewrite Proxy not working
hello,
try using the following:
In case it won't work, please, provide the rewrite.log for a testing request. Logging issues described in FAQ
Regards
Andrew
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
- NiranjanKC
-
- Posts: 2
- Joined: 17 Oct 2012, 14:35
Re: Rewrite Proxy not working
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?
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?
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Rewrite Proxy not working
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
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
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests