0

Is it possible to have a wildcard for a reverse Proxy using ProxyPass?

I've seen similar config below for ProxypassMatch, so I tried to model it off of that using just proxypass

ProxyPass ^/retirement-readiness-savings(.*)$ http://prod-domain-com-2018.azurewebsites.net/retirement-readiness-savings-november-2018/$1

Issue I'm having is with character limits(25) on directory names in our new CMS.

Full URL for example below: /retirement-readiness-savings-november-2018

For Ex with Reverse Proxy config below:

#ProxyPass ^/retirement-readiness-savings(.*)$ http://prod-domain-com-2018.azurewebsites.net/retirement-readiness-savings-november-2018$1 #ProxyPassReverse ^/retirement-readiness-savings(.*)$ http://prod-domain-com-2018.azurewebsites.net/retirement-readiness-savings-november-2018$1 

So as long as the URL Matches the first 3 words it would still host the same page, ignoring november-2018

Only have ProxyPass installed and using httpd.conf to manage ReverseProxy

We are using RHEL 5.11 with mod_proxy module installed

EDIT: What I'm trying to do is catch/check the first 25 characters of the directory path, but still map to the full azure path.

1 Answer 1

0

It's not clear to me where the 25 char restriction is, but perhaps you want to do something like this?

ProxyPass ^/site/(.{1,25}).*$ http://prod-domain-com-2018.azurewebsites.net/site/$1 

That would capture the first 25 chararcters after /site/ and then use that in the mapping, for example, a request for this:

/site/retirement-readiness-savings-some-thing-or-other 

... would map to this:

http://prod-domain-com-2018.azurewebsites.net/site/retirement-readiness-savi 

('retirement-readiness-savi' == 25 char limit)

1
  • Thank you for that guzzijason, The Character limit is set in the CSM for directory names. I like what oyu have mentioned above what I'm trying to do is catch the first 25 characters of the directory name but still map to the full URL. Commented Oct 24, 2018 at 17:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.