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.

Is it possible to put a reverse proxy in an .htaccess file? Something like this:

ProxyPass /path/ http://128.10.10.10/
ProxyPassReverse /path/ http://128.10.10.10/

If not, are there other options?

EDIT Because I've got a domain like domain.com and a path in it like /path so that domain.com/path redirects to 128.10.10.10.

This works, but I'd like to set it up so when I'm at 128.10.10.10 after the redirect the URL bar at the top of the browser reads domain.com/path and so that any subfolders therein would be accessible via domain.com/path/subfolders.

share|improve this question
    
Why don't you just test it? –  mgorven Feb 5 '13 at 23:21
    
Could you elaborate on why? –  Stephan Feb 5 '13 at 23:39
    
Thanks for the reply; see the edit above. –  emm Feb 5 '13 at 23:43
add comment

1 Answer

According to the mod_proxy documentation:

Context: server config, virtual host, directory

Which doesn't include ".htaccess", and so the answer is no.

share|improve this answer
    
Would you happen to know if I can achieve a URL mask with RewriteRule? I want to replace http://128.10.10.10/ with the domain this .htaccess file is on with the path of /path above. These rewrite rules confuse me. –  emm Feb 5 '13 at 23:38
add comment

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.