Url redirection with no trailing slash is not working via tuckey

时间:2018-12-19 11:31:36

标签: nginx tuckey-urlrewrite-filter

I have a situation where in my webapp which stands behind a nginx proxy, gets redirected to http from https when I dont supply a trailing slash in the url.

TO elaborate, when I trigger a call such as

https://localhost:/my-web-app/

I get a proper redirection to the right page.

However, if I omit the trailing slash like below,

https://localhost:/my-web-app

I get redirected to a http 400 Bad request error page saying "The plain HTTP request was sent to HTTPS port"

This is the http redirected url

http://localhost:/my-web-app/

None of the redirect filters are hit on the server.

Below is the snippet of my url-rewrite.xml

Can anyone please let me know what am i doing wrong here!

Thanks for all the help!

enter image description here

0 个答案:

没有答案