zono
zono

Reputation: 8584

How can I configure ProxyPass in the case of both directory path only and with file path

What I want is a redirect configuration like the following.

https://example.com/abc => https://test.com
https://example.com/abc/test.html => https://test.com/abc/test.html

I am trying to do that but not working yet.

ProxyPassMatch ^/abc/$ https://test.com
ProxyPass /abc https://test.com/abc

Any help will be appreciated.

Upvotes: 0

Views: 611

Answers (1)

boky
boky

Reputation: 835

For starters, you most likely need (notice the slashes):

ProxyPassMatch ^/abc$ https://test.com
ProxyPass /abc/ https://test.com/abc/

To cover the use case you're explaining.

Upvotes: 1

Related Questions