Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite for POST/web services

         

techy_bolek

8:09 pm on Mar 1, 2012 (gmt 0)

10+ Year Member



I'm new to apache_mod but I was able to get it to work for simple URL translation for static pages accessed using hte GET method. I'm having trouble to get the URL translation to work for web services though. Basically all I want is to redirect the request from apache to tomcat that runs under 8093. I tried:

RewriteRule myproject/myservices/myService/ [localhost:8093...]

But I get a "The document has moved here" response. Any ideas would be appreciated. Thanks.

techy_bolek

8:30 pm on Mar 1, 2012 (gmt 0)

10+ Year Member



Looks like I need to use mod_proxy for this instead of mod_rewrite.

ProxyRequests off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /myservice/ [localhost:8093...]
ProxyPassReverse /myservice [localhost:8093...]

Now I still need to figure out what all that means. :)

g1smd

9:30 pm on Mar 1, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



POST requests cannot be redirected. This is a security feature.

You'll need a Proxy seeting of some sort.