How to i configure mod_proxy to mask requests

apache-2.2configurationmod-proxymod-rewrite

Maybe this is a noob question but usually I dont have to deal with that stuff. I just installed apache with mod_proxy and I want to use it as a forward http proxy. What i want to do is, if a request of a certain format is executed by a web client, then the request will be send to another destination url without the client noticeing it.

No matter what domain, when the url contains 'mysign' directly after the domain name it should be send to destination I specify in my config. For e.g. all following request should be send to 'http://localhost/mysign/' instead of there ordinary destination:

http://www.gooogle.com/mysign
http://www.another.com/mysign
http://web.dev.us/mysigne/total?p=2

following request should not be tunneld:

http://mysign.not.com/test
http://wwww.ende.com/do/not/mysign

how can I configure that?

Update: I dont want to send a redirect to the client. The client browser shouldn't notice that the response is sent by another endpoint than expcected.

Best Answer

I'm not sure this'll work, but you could try it:

<ProxyMatch http://[^/]+/.*mysign>
    Allow from All
    Order Allow,Deny
    RewriteEngine on
    RewriteRule . http://localhost/mysign/ [P]
</ProxyMatch>

If the http://localhost/mysign/ URL is being served by the same server which is acting as the proxy, then you could try replacing the RewriteRule line with this:

    RewriteRule ^.*$ /mysign