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.

Given the following url:

domain.com/wiki/

I'd like apache to redirect all requests below that (so domain.com/wiki/*) to otherdomain.com:8080/. But the trick is I want the user to always see domain.com/wiki/. And the webapp on otherdomain thinks it's running at the root level, so has internal links to css and images and such that are like /css/style.css. Those urls need to be rewritten to /wiki/css/style.css.

The following config gets mostly there but is missing the /css & /images rewrite solution:

ProxyRequests Off
ProxyPass /wiki/ http://otherdomain.com:8080/
ProxyPassReverse /wiki/ http://otherdomain.com:8080/

Any and all help appreciated.

share|improve this question
    
check this answer, note the ending slash is NOT mandatory serverfault.com/questions/429122/… –  annoyed linux geek Sep 9 at 15:46

1 Answer 1

up vote 2 down vote accepted

I think you need to use something like ProxyHTMLURLMap.
If I remember it correctly it would work like this:

ProxyHTMLURLMap http://domain.com/wiki/css http://otherdomain.com:8080/css [R]

share|improve this answer
    
This looks right, and here's a nice example of how to do what I'm looking for: apachetutor.org/admin/reverseproxies –  evil_breeds Oct 19 '11 at 13:02

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.