I am attempting to take all requests matching the regex ^/(map/maps/[^/]*/live/.*)
redirect into a local server http://127.0.0.1:8100/. However, the path that needs to be passed to the backreference differs from the request. Such as the request would be www.website.com/map/maps/example/live/data
, and the backreference needs to direct to /maps/example/live/data
. I've tried ProxyPassMatch ^/(map/maps/[^/]*/live/.*) http://127.0.0.1:8100/$1
but that seems to redirect incorrectly.
Add a comment
|
1 Answer
According to this answer you might want to try this:
ProxyPassMatch (map/maps/[^/]*/live/.*) http://127.0.0.1:8100/$1
You wrote the backreference need to direct to /maps...
without preceding /map/
but your regex does not reflect this- your regex include the preceding map/
So which one is it?
- www.website.com/map/maps/example/live/data -> http://127.0.0.1:8100/maps/example/live/data
- www.website.com/map/maps/example/live/data -> http://127.0.0.1:8100/map/maps/example/live/data
Also make sure your regex does what you think it does here
-
Thank you for your reply! The path needs to be directed from www.website.com/map/maps/example/live/data -> 127.0.0.1:8100/maps/example/live/data– FiravCommented Apr 9 at 12:47
-
I have tried what you have suggested, however I don't believe its redirecting that traffic correctly as I'm not seeing the data its supposed to forward. I've also checked my regex against regex101 and it does indeed match the criteria I'm looking to match.– FiravCommented Apr 9 at 12:58