Sign up ×
Server Fault is a question and answer site for 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/
ProxyPassReverse /path/

If not, are there other options?

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

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

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. – CD-RUM Feb 5 '13 at 23:43

1 Answer 1

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 with the domain this .htaccess file is on with the path of /path above. These rewrite rules confuse me. – CD-RUM Feb 5 '13 at 23:38

Your Answer


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.