求个简单的.htaccess伪静态规则
时间:2021-07-01 10:21:17
帮助过:8人阅读
/e/tags/index.php?page=23&tagname=%B9%D8%D3%DA%D3%D1%D2%EA%D5%E4%B9%F3%B5%C4%B8%F1%D1%D4&line=3&tempid=13
当page不是0的时候伪静态成
/tag-%B9%D8%D3%DA%D3%D1%D2%EA%D5%E4%B9%F3%B5%C4%B8%F1%D1%D4/23/
当page=0的时候伪静态成
/tag-%B9%D8%D3%DA%D3%D1%D2%EA%D5%E4%B9%F3%B5%C4%B8%F1%D1%D4/
回复讨论(解决方案)
RewriteCond %{QUERY_STRING} page=0&tagname=([^&]+)RewriteRule . http://bbs.hupu.com/tag-%1/? [R=302,L]RewriteCond %{QUERY_STRING} page=([\d]+)&tagname=([^&]+)RewriteRule . http://localhost/tag-%2/%1? [R=302,L]