Win a copy of Kotlin Cookbook this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

LocationMatch appends match string with url specified in ProxyPass

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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: 21838
105
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
A wop bop a lu bop a womp bam boom! Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!