Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

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

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.