我需要一些htaccess 301重定向的帮助。
我想从此规则进行重定向:
RewriteRule ^author-details/([^/]+)-([^/]+).html$ /authors-details.php?id=$1&slug=$2 [QSA,L]
遵守这条规则:
RewriteRule ^([^/]+)-biography-([^/]+).html$ /authors-details.php?id=$1&slug=$2 [QSA,L]
提前致谢。
答案 0 :(得分:2)
RewriteRule ^author-details/([0-9]+)-([^/]+).html$ http://your.host/$1-biography-$2.html [QSA,R=301]
或只是
RewriteRule ^author-details/([0-9]+)-([^/]+).html$ $1-biography-$2.html [QSA,R=301]