我需要重定向
http://mysite.com/mp3/-angel-la-pared-shakira-/
到这个
http://mysite.com/mp3/angel-la-pared-shakira/
这是我的htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^mp3/(.*)/$ search.php?q=$1
RewriteEngine On
RewriteRule (.*)\.xml sitemap.php [nocase]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*[^/]$ /$0/ [L,R=301]
答案 0 :(得分:0)
将其添加到htaccess文件的开头:
RewriteRule ^mp3/-([^/]+)-/$ /mp3/$1/ [L,R=301]