Nginx replace // with / in URL -


we getting web requests www.domain.com//index.php resolving, causing issues google. how can rewrite request catch these , redirect www.domain.com/index.php

thanks

by default ngingx merges double-slashes , urls www.domain.com//index.php works well.

you can turn off merging , make rewrite rule redirection:

merge_slashes off; rewrite (.*)//(.*) $1/$2 permanent; 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -