Removing duplicate slashes in URL via .htaccess or PHP
问题 I'm trying to remove duplicate slashes from URLs. The following .htaccess rule: RewriteRule ^(.+)//+(.*)$ $1/$2 [L,NC,R=301] do NOT work for me on a URL such as the following: http://www.mp7.org/?site=69.com\\\\\\\\\\\\\\\\ The .htaccess file #### mod_rewrite in use Options +FollowSymlinks RewriteEngine On 回答1: This rule won't work for backslashes . You must add a similar rule with backslashes RewriteRule ^(.+)\\\\+(.*)$ $1\\$2 [L,R] If you want to replace backslashes with (forward) slashes,