You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sai Jai Ganesh Gurubaran <sg...@cordys.com> on 2006/10/03 09:43:19 UTC

[users@httpd] mod_rewrite on 2.0.50

Hi,
I am a newbie.
We have set up Apache 2.0.50 as a forward proxy.
Want to redirect a particular (external) page to our internal page.
i.e. for  http://www.abc.com/suggestions.htm to
http://myanotherserver/suggestion.htm

For this I tried mod_rewrite.
The following code in the httpd.conf


#Apache as a Proxy
ProxyRequests On

RewriteEngine On
RewriteLogLevel 9
RewriteLog rewrite.log
RewriteCond %{HTTP_HOST} ^www.abc.com [NC]
RewriteCond %{REQUEST_URI} ^/suggestions.htm
RewriteRule ^(.+) http://myanotherserver/suggestion.htm [L,R]


The problem here is:
	1. if Proxy is not present then mod_rewrite rules are applied
(seen through the log). Since Proxy is not there we don't get the
content :(
	2. If proxy is on, rewrite rules are not applied but
http://www.abc.com/suggestions.htm content is fetched

Am I missing out some thing? (it has to be)

I tried the same with 2.2.3 and it works smooth (with ProxyRequests On).
But we need to make this work on 2.0.50

Any help will be highly appreciated 

Regards,
Sai

***********************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this 
message by anyone else is unauthorized. If you are not the 
intended recipient, any disclosure, copying, or distribution of the 
message, or any action or omission taken by you in reliance on 
it is prohibited and may be unlawful. Please immediately contact 
the sender if you have received this message in error. This email 
does not constitute any commitment from Cordys Holding BV or 
any of its subsidiaries except when expressly agreed in a written 
agreement between the intended recipient and 
Cordys Holding BV or its subsidiaries.
***********************************************************************



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite on 2.0.50

Posted by Nick Kew <ni...@webthing.com>.
On Tuesday 03 October 2006 08:43, Sai Jai Ganesh Gurubaran wrote:
> Hi,
> I am a newbie.
> We have set up Apache 2.0.50 as a forward proxy.

Why such an old version?

> Want to redirect a particular (external) page to our internal page.
> i.e. for  http://www.abc.com/suggestions.htm to
> http://myanotherserver/suggestion.htm

That's a reverse proxy.

> #Apache as a Proxy
> ProxyRequests On

If that's open to the outside, it's a serious security hole.

See http://www.apacheweek.org/tutorials/reverseproxies

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.prenhallprofessional.com/title/0132409674

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org