• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

LocationMatch appends match string with url specified in ProxyPass

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem with LocationMatch, I am using below rule to match urls like
https://<host>:<port>/rest/doc/<client-context>/swagger-ui.html and want to redirect it to underline server with url

https://<host>:<port>/rest/swagger-ui.html

Note: <client-context> can be any name.

I have add below rule for the same



So for url https://<host>:<port>/rest/doc/client1/swagger-ui.html its generating

https://<host>:<port>/rest/rest/doc/client1/swagger-ui.html
but i want url should be like this

https://<host>:<port>/rest/swagger-ui.html
The problem is its appending match string after proxypass url, like below /rest/rest/doc/abc/swagger-ui.html

if I use Location instead of LocationMatch and hardcode client context it works file.

Please help.

Thanks Ashok Sharma
 
Sheriff
Posts: 22682
128
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try adding a RewriteRule before the ProxyPass (don't forget to turn on the RewriteEngine).

And welcome to the Ranch!
 
Ashok Ibm Sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have much experience in writing these rules so can you please elaborate a bit, or can you tell me how should my rule look like so that it don't append the match string

currently my rule looks like this, what changes should I make in this?



Thanks a ton for your help.

Thanks
Ashok Sharma
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic