crstin crstin - 1 year ago 153
Apache Configuration Question

How to redirect subfolder as proxy in htaccess?

I have isso app running on

and I'd like to proxy requests from

These were my approaches:

RewriteRule*)$$1 [P]
RewriteRule /isso/(.*)$$1 [P]
RewriteRule /isso(.*)$$1 [P]

Normally I'd adjust
but in this case I can't do that on my hoster (uberspace).

<Location "/isso">
ProxyPass ""
ProxyPassReverse ""

Also, I don't like to use a subdomain for this.

Answer Source

Your second approach was almost correct (in fact, exactly that would work in .conf file).

In per-directory context (Directory or .htaccess), the Pattern is matched against only a partial path: the directory path where the rule is defined is stripped from the path before comparison - up to and including a trailing slash!. The removed prefix always ends with a slash, meaning the matching occurs against a string which never has a leading slash.


RewriteRule ^isso/(.*)$$1 [P]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download