www-modproxy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Hutley <br...@hutley.net>
Subject Re: mod_proxy and HTTP 302 response
Date Tue, 20 Aug 2002 13:34:26 GMT
J.D. Silvester wrote:

>On Tue, 20 Aug 2002, Brett Hutley wrote:
>
>  
>
>>J.D. Silvester wrote:
>>*stuff snipped*
>>
>>    
>>
>>>Other than the first line, all the lines have a colon.  So I am not sure
>>>what is going wrong here.  Any ideas?
>>> 
>>>
>>>      
>>>
>>Hmmm... I'm not sure what is going on here. I'd probably have to set up 
>>a similar scenario in order to investigate. As a work-around, why don't 
>>you use mod_rewrite to rewrite incoming requests to the server that is 
>>doing the redirect, to redirect directly from the proxy to the server 
>>that is the end-point of the redirect?
>>If you know what I mean... :)
>>
>>    
>>
>
>Yeah I was thinking of that.  I'll just have to get my head around
>mod_rewrite (never been able to fully do that).
>  
>

Yeah, me neither.
As Graham Leggett pointed out, if the redirection is based on the host 
name (or part of the host name), you can use name-based virtual hosting. 
Then you can apply your rewrite rule inside the virtual host container 
(if you need to map the path coming in on the request to the REAL path 
on you server).

Just off the top of my head, the following has the vague possibility of 
(accidentally) being something like what you want...  (but don't be 
fooled by my tone of certainty...)

... within your virtual host container...
RewriteEngine On
RewriteRule ^/incoming_dir(.*) http://end.server.com/real_dir$1 [R,L]

# if you want to proxy all other requests to the original server...
RewriteRule ^/(.*) http://other.server.com/$1 [P,L]

# to help in debugging... (but don't leave it on log level 9 for long).
RewriteLog "/var/log/proxy_log"
RewriteLogLevel 9

Cheers, Brett



Mime
View raw message