I want to do case-insensitive URL redirection in nginx Below is my code.
location ~* WapsiteDataFetch{
rewrite WapsiteDataFetch(.*) http://images.xample.com/xyz/images$1 permanent;
}
In the case above
www.example.com/WapsiteDataFetchredirects correctly http://images.xample.com/xyz/images
however the url is "www.example.com/WAPSITEDATAFETCH"not redirecting properly.
Even if I change one character, it gives a 404 error.
I tried a lot of blogs and saw a lot of posts from, and many of them suggested "~ *", but in my case it does not help me.
Please help me as I am stuck on this a couple of days.
source
share