Hi Pete, Put an "L" inside the line with the "asx" -Line, so that Apache knows this will be the "last " Rule. Than with RewriteRules you don't need "ProxyPassReverse" Than check these [ist is only inserted an ",L" before the "]": RewriteEngine on RewriteRule /pub/wiv/(.*).asx$ ajp://theTomcatBox:8009/pub/wiv?seoName=$1 [P,QSA,L] RewriteRule /pub ajp://theTomcatBox:8009/pub [P] Another possibility will be to change the URI and than pass it with the next RewriteRule (should be the same like the things above). Check it and tell me if it is working RewriteCond %{QUERY_STRING} "!^seoName" RewriteRule /pub/wiv/(.*).asx$ /pub/wiv?seoName=$1 [QSA,PT] RewriteRule /pub ajp://theTomcatBox:8009/pub [P] At the momemt i use mod_jk to the back tomcat, but i will check this with mod_proxy_ajp as well. Here i use it with a rewrite of the actual URI an this i transparent to the Clients Browser, They never see /b/ in their browsers RewriteCond %{REQUEST_URI} "!^/abc/def" RewriteRule ^/abc/(.*)$ /abc/def/$1 [PT] JkMount /abc* ajp13_tomcat Ciao Oliver Von: Pete Lamborne [mailto:pete@xxxxxxxxxxx] Gesendet: Mi 04.01.2006 17:53 An: users@xxxxxxxxxxxxxxxx Betreff: Re: [users@httpd] rewrite gurus help? (with mod_proxy_ajp) Yes, but as you could see from my code sample, there are no redirects. There is a proxypass preceded by a rewrite rule. That is why I feel that the interaction between mod_proxy_ajp and mod_rewrite is buggy -- as far as I can tell, the behavior I'm getting is not due to an improper configuration. Is anyone else out there using apache 2.2 with mod_rewrite and mod_proxy_ajp to pass to tomcat? I'd really like to hear other people's experience and see their config. Rajendra Kadam -X (rakadam - eTouch Systems at Cisco) wrote: >Hi Pete, > >You said that ..... "Rewrite goes into infinite loop" Is that correct ? > >I also faced the same problem. And resolution that is when you are redirecting to some other url that particular url should not be in turn re-directed. Else it's infinite loop. > >See this thread : http://mail-archives.apache.org/mod_mbox/httpd-users/200512.mbox/%3cF370ADC0040A424E8AB27D2BCEE35D0C013CC16E@xxxxxxxxxxxxxxxxxxxxxxxxxx%3e > >It might help you. > >Cheers, >Rajendra > > >-----Original Message----- >From: Pete Lamborne [mailto:pete@xxxxxxxxxxx] >Sent: Tuesday, January 03, 2006 10:10 AM >To: users@xxxxxxxxxxxxxxxx >Subject: Re: [users@httpd] rewrite gurus help? (with mod_proxy_ajp) > >Yes I am using 2.2, for the advantages mod_proxy_ajp was supposed to have over mod_jk. Now I am rethinking that decision... > >I will use the logging for more insight, thanks for that tip as well. I will post any info I find, and appreciate any other suggestions. >pete > > >Axel-Stéphane SMORGRAV wrote: > > > >>Another advantage of using RewriteRule over ProxyPass is that you get a lot better logging provided you set "RewriteLogLevel 3". That may help you understand why it loops... >> >>I understood that you originally ended up with a redirect, but I thought that it might have been the application that was generating the redirect. >> >>I take it you are using Apache 2.2 ? >> >>-ascs >> >>-----Original Message----- >>From: Pete Lamborne [mailto:pete@xxxxxxxxxxx] >>Sent: Tuesday, January 03, 2006 6:56 PM >>To: users@xxxxxxxxxxxxxxxx >>Subject: Re: [users@httpd] rewrite gurus help? (with mod_proxy_ajp) >> >>ASCS, thanks for your reply. >> >>Your suggestion (and several permutations of it) were not successful; I don't quite understand why, but it created an infinite loop. >> >>I don't think the original situation (where it *works*, but the URL is rewritten in the user's browser) is due to ProxyPass being evaluated first, because the URL did indeed get rewritten 1st (it's just that it wasn't transparent to the user). >> >>I believe this is more likely to be a bug in the way the mod_proxy_ajp and mod_rewrite interact, rather than a matter of configuration. >> >>But I really appreciate more suggestions and/or workarounds! >>Thanks, pete >> >> >>Axel-Stéphane SMORGRAV wrote: >> >> >> >> >> >>>Could it possibly be because ProxyPass is evaluated before RewriteRule ? >>> >>>How does the following work : >>> >>>RewriteEngine on >>>RewriteRule /pub/wiv/(.*).asx$ >>>ajp://theTomcatBox:8009/pub/wiv?seoName=$1 [P,QSA] RewriteRule /pub >>>ajp://theTomcatBox:8009/pub [P] ProxyPassReverse /pub >>>ajp://theTomcatBox:8009/pub >>> >>>-ascs >>> >>>-----Original Message----- >>>From: Pete Lamborne [mailto:pete@xxxxxxxxxxx] >>>Sent: Monday, January 02, 2006 6:48 PM >>>To: users@xxxxxxxxxxxxxxxx >>>Subject: [users@httpd] rewrite gurus help? (with mod_proxy_ajp) >>> >>>Hey all, >>>There is very little info out there on this so far, given how new >>>mod_proxy_ajp is. One post I found seemed to indicate the same bug >>>with no solution.... >>> >>>The problem is that I can't get mod_rewrite to work transparently with >>>mod_proxy_ajp. It either doesn't work at all (when I don't specify >>>:proxy or [P]), or works like a redirect, changing the URL in the >>>user's browser. >>> >>>Here's a quick conf: >>> >>>RewriteEngine on >>>RewriteRule /pub/wiv/(.*).asx$ /pub/wiv?seoName=$1 [P] ProxyPass /pub >>>ajp://theTomcatBox:8009/pub ProxyPassReverse /pub >>>ajp://theTomcatBox:8009/pub >>> >>>Here's something else I tried with the same results: >>> >>>RewriteEngine on >>>RewriteRule /pub/wiv/(.*).asx$ proxy:ajp://dev3:8009/pub/wiv?seoName=$1 >>>ProxyPass /pub ajp://theTomcatBox:8009/pub ProxyPassReverse /pub >>>ajp://theTomcatBox:8009/pub >>> >>>Both of these solutions work, but replace the pretty URL with the ugly >>>one for the end-user. I want it to be transparent to the user. >>> >>>What am I missing? >>> >>> >>> >>>--------------------------------------------------------------------- >>>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@xxxxxxxxxxxxxxxx >>> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >>>For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >>> >>> >>>--------------------------------------------------------------------- >>>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@xxxxxxxxxxxxxxxx >>> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >>>For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >>> >>> >>> >>> >>> >>> >>> >>> >>--------------------------------------------------------------------- >>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@xxxxxxxxxxxxxxxx >> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >>For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >> >> >>--------------------------------------------------------------------- >>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@xxxxxxxxxxxxxxxx >> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >>For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >> >> >> >> >> >> > >--------------------------------------------------------------------- >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@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > >--------------------------------------------------------------------- >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@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > > > --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
<<winmail.dat>>
--------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx