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

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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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
share|improve this answer

Check ProxyPass* directives. What you want is probably:

ProxyPass /mysign http://localhost/mysign/
ProxyPassReverse /mysign http://localhost/mysign/
share|improve this answer
    
ProxyPass and ProxyPassReverse are for reverse proxying arrangements. They don't apply to the question at hand. –  Kenster Sep 7 '09 at 12:51
    
It's exactly what he asks from what I understand "following request should be send to 'localhost/mysign/'; instead of there ordinary destination" –  radius Sep 7 '09 at 13:37

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.