-1

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.

2
  • Why don't you just test it?
    – mgorven
    Feb 5, 2013 at 23:21
  • Could you elaborate on why?
    – Stephan
    Feb 5, 2013 at 23:39

1 Answer 1

0

According to the mod_proxy documentation:

Context: server config, virtual host, directory

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

1
  • 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.
    – t56k
    Feb 5, 2013 at 23:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .