帮助301重定向

时间:2011-08-21 10:52:45

标签: .htaccess

我需要一些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]

提前致谢。

1 个答案:

答案 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]

mod_rewrite reference