Removing duplicate slashes in URL via .htaccess or PHP

前端 未结 2 778
刺人心
刺人心 2021-01-26 10:00

I\'m trying to remove duplicate slashes from URLs. The following .htaccess rule:

RewriteRule ^(.+)//+(.*)$ $1/$2 [L,NC,R=301] 

do NOT work for

2条回答
  •  渐次进展
    2021-01-26 10:24

    This is because of IIS server, and mainly almost certainly your site is urbanized in .Net .asp or . aspx You need to put into service one miniature script, when your server be given http or https demand it must Lcase(URL). If there are not a lot of pages, you can rename all within lowercase, modify all inner linking of WebPages to lowercase and after that appeal URL removal request in Google webmaster tools.

    how to remove duplicate urls

提交回复
热议问题