I am using nginx in with my Java Application and my problem is that nginx is merging the slashes and I am unable to redirect my website to the correct version.
For instance:
http://goout.cz/cs/koncerty///praha/
is merged to
http://goout.cz/cs/koncerty/praha/
and then I am unable to recognized the malformed URL and perform the redirection.
I tried to set
merge_slashes off;
and then:
rewrite (.*)//(.*) $1/$2 permanent;
But this has no effect and the // stays in the URL.
How can I achieve this?