How to setup tomcat proxy so that, e.g., /proxy/http/1.2.3.4/index.html causes Tomcat to proxy http://1.2.3.4/index.html?

link|improve this question
Are you trying to make an open proxy where any IP address substituted for 1.2.3.4 works; or just one specific destination server? – Chris S Mar 12 '10 at 14:30
feedback

1 Answer

This looks possible via urlrewritefilter. (A filter which can be used in Tomcat or any servlet engine) The rule would look like this (untested) but should work according to the docs:

 <rule>
   <from>^/proxy/http/[^/]+/(.*)</from>
   <to type='proxy'>http://$1/$2</to>
 </rule>

http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/index.html

link|improve this answer
feedback

Your Answer

 
or
required, but never shown