The following code works for me to hide the Extensions in the Middle of the URL, but it's redirecting twice:
rewrite ^(.+)\.html(/.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri/index.html $uri.html $uri/ $uri =404;
First, it redirects the end .html
Second, it redirects the middle .html
I require it to be in a single span. Any !dea?
rewrite ^(.+)\.html(/.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri/index.html $uri.html $uri/ $uri =404;
First, it redirects the end .html
Second, it redirects the middle .html
I require it to be in a single span. Any !dea?