Re: RewriteRule Proxy problems
> > > 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. > > > > Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with > > the query string. > > Why not? I did not put a "$" at the end of the regexp so it should still > match. I've also tried: > > RewriteRule ^/(.*)\.asp(.*) http://66.33.85.239/$1.asp$2 [p] > > but got the same "404 Not Found" error. Sorry, I should have said that it wouldn't match the query string itself. (I'm a little under-rested and over-caffeinated at the moment.) Looking back at your post, it seems like it still should have worked although it would have had no query string in the proxied request. You might try ^/(.*)\.asp(.*)$ for matching the whole query string, but I wouldn't thing it would be necessary with a greedy regex. - Perrin
Re: RewriteRule Proxy problems
On Mon, 30 Jul 2001, Perrin Harkins wrote: > > 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. > > Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with > the query string. Why not? I did not put a "$" at the end of the regexp so it should still match. I've also tried: RewriteRule ^/(.*)\.asp(.*) http://66.33.85.239/$1.asp$2 [p] but got the same "404 Not Found" error.
OT: Re: RewriteRule Proxy problems
Perrin Harkins wrote: > > 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. > > Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with the > query string. > - Perrin seems like it does match. it's monday, so maybe my internal pattern matching engine needs some tweaking. ;-) the rewrite engine gets handed: /rotatorstats.asp?login=pmak0 start from the beginning of the string and match the leading slash, then match all following characters. keep backing up till \.asp is also matched. i don't see how the query string makes any difference. if he put an end of string '$' at the end of the pattern, then that would change the matching and cause it to fail. -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/
Re: RewriteRule Proxy problems
> 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. Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with the query string. - Perrin
RewriteRule Proxy problems
I have a front-end lightweight Apache proxying Apache::ASP scripts 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. I've also tried: RewriteRule ^/(.*\.asp(\?.*)?$) http://66.33.85.239/$1 [p] but it gives the same error message.