Nginx redirect issue which has query string and special characters

628 Views Asked by At

We have configured Nginx web server for our project. We have a requirement to redirect the url which has query string and special characters. Below is the URL.

localhost/searchPage.action?keyWord=line%20cards&overRideCatId=N

We tried 301 redirect using below rule but it is not working. rewrite ^/searchPage.action(.)keyWord(.)line%2520cards&overRideCatId(.*)N https://localhost/line-cards/ permanent;

How to redirect special characters in Nginx 301 redirect rules?

0

There are 0 best solutions below