You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Philip Mak <pm...@aaanime.net> on 2001/07/29 14:16:56 UTC

RewriteRule Proxy problems

I have a front-end lightweight Apache proxying to a backend mod_perl
Apache. I am experiencing problems with query strings.

In my lightweight httpd.conf, I have:

RewriteRule ^/(.*)\.asp http://66.33.85.239/$1.asp [p]

If I go to http://www.buildreferrals.com/rotatorstats.asp, it gets proxy'd
correctly.

But if I go to http://www.buildreferrals.com/rotatorstats.asp?login=pmak0
(that's the same URL, but with a query string added), then I get a "404
Not Found" error. The error log says:

[Sun Jul 29 08:10:11 2001] [error] [client 206.173.59.73] File does not
exist: proxy:http://66.33.85.239/rotatorstats.asp?login=pmak0

Does anyone know what I'm doing wrong? That error message seems strange
because if I paste the http://66.33.85.239/rotatorstats.asp?login=pmak0
URL in my browser it will load. Looking at the logs for 66.33.85.239, it
never even received a request from the frontend server when I got the 404
Not Found.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: RewriteRule Proxy problems

Posted by Philip Mak <pm...@aaanime.net>.
On Mon, 30 Jul 2001, Joshua Chamas wrote:

> Having never used RewriteRules before, it seems that maybe
> http://66.33.85.239/rotatorstats.asp?login=pmak0 didn't match
> your rule "RewriteRule ^/(.*)\.asp http://66.33.85.239/$1.asp [p]"
> so that it got a proxy error?
>
> Would it help if your rule were:
>   RewriteRule ^/(.*\.asp(\?.*)?$) http://66.33.85.239/$1

I just tried it, but I get the same error messages. This is perplexing.

I'll try asking on the mod_perl mailing list. Thanks anyways.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: RewriteRule Proxy problems

Posted by Joshua Chamas <jo...@chamas.com>.
Philip Mak wrote:
> 
> I have a front-end lightweight Apache proxying to a backend mod_perl
> Apache. I am experiencing problems with query strings.
> 
> In my lightweight httpd.conf, I have:
> 
> RewriteRule ^/(.*)\.asp http://66.33.85.239/$1.asp [p]
> 
> If I go to http://www.buildreferrals.com/rotatorstats.asp, it gets proxy'd
> correctly.
> 
> But if I go to http://www.buildreferrals.com/rotatorstats.asp?login=pmak0
> (that's the same URL, but with a query string added), then I get a "404
> Not Found" error. The error log says:
> 
> [Sun Jul 29 08:10:11 2001] [error] [client 206.173.59.73] File does not
> exist: proxy:http://66.33.85.239/rotatorstats.asp?login=pmak0
> 

Having never used RewriteRules before, it seems that maybe 
http://66.33.85.239/rotatorstats.asp?login=pmak0 didn't match
your rule "RewriteRule ^/(.*)\.asp http://66.33.85.239/$1.asp [p]"
so that it got a proxy error?

Would it help if your rule were:
  RewriteRule ^/(.*\.asp(\?.*)?$) http://66.33.85.239/$1

assuming it even supports this regexp syntax?

-- Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org