Re: AW: [users@httpd] rewrite gurus help? (with mod_proxy_ajp)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pete Lamborne wrote:
Gentlemen, thanks for revisiting this; I have not gotten it to work yet and still need to figure something out.

Oliver, your 1st suggestion resulted in the infinite loop again:

 RewriteEngine on
RewriteRule /pub/wiv/(.*).asx$ ajp://theTomcatBox:8009/pub/wiv?seoName=$1 [P,QSA,L]
 RewriteRule /pub                      ajp://theTomcatBox:8009/pub [P]

here is the error log.

it's the access log.

Note that the 3rd line is what I want it to do, and I don't know what starts the infinite loop from line 4 on down.

10.1.10.82 - - [05/Jan/2006:11:51:39 -0700] "GET /favicon.ico HTTP/1.1" 200 18014 10.1.10.82 - - [05/Jan/2006:11:51:39 -0700] "GET /pub/wiv/Shop_Surf_00314_All_The_Rage.asx HTTP/1.1" 302 - 10.1.10.82 - - [05/Jan/2006:11:51:39 -0700] "GET /pub/wiv/?seoName=Shop_Surf_00314_All_The_Rage HTTP/1.1" 302 - 10.1.10.82 - - [05/Jan/2006:11:51:39 -0700] "GET /pub/?seoName=Shop_Surf_00314_All_The_Rage HTTP/1.1" 302 -
[...]
The 2nd suggestion

 RewriteCond  %{QUERY_STRING}  "!^seoName"
 RewriteRule /pub/wiv/(.*).asx$ /pub/wiv?seoName=$1 [QSA,PT]
 RewriteRule /pub                      ajp://theTomcatBox:8009/pub [P]


The redirect comes from your application? Did you setup/check the rewriteLog? this is essential to debug rewriteRules.

RewriteEngine on
#RewriteCond  %{QUERY_STRING} !^seoName
RewriteRule ^/pub/wiv/(.*)\.asx$ /pub/wiv?seoName=$1 [QSA]
RewriteRule ^/pub/?(.*)      ajp://theTomcatBox:8009/pub/$1 [P]

You're using the rules in per-server context, right?

Note: with ajp://theTomcatBox:8009/pub you're only proxying to ajp://theTomcatBox:8009/pub even if you did call /pub/abc -- this is not the proxyPass directive. To proxy this request to ajp://theTomcatBox:8009/pub/abc, you'll have to modify the rule like above.

--
Robert


---------------------------------------------------------------------
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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux