网址是齐博cms搭建的,使用了伪静态,具体的伪静态规则,网站后台自带,直接使用就行了,我这里说的是,使用伪静态后,动态链接还是能打开的,那么如何将动态链接自动301跳转到伪静态呢?这样可以将网页权重集中,也防止被搜索引擎重复收录伪静态,经过研究得出正确的301伪静态规则。
RewriteCond %{QUERY_STRING} ^fid=([0-9]+)$
RewriteRule ^/list\.php$ /list-%1-1.htm? [R=301,L]
RewriteCond %{QUERY_STRING} ^fid=([0-9]+)&aid=([0-9]+)$
RewriteRule ^/bencandy\.php$ /bencandy-%1-%2-1.htm? [R=301,L]
RewriteRule ^(.*)/list-([0-9]+)-([0-9]+)\.htm(.*)$ $1/list\.php\?fid=$2&page=$3
RewriteRule ^(.*)/bencandy-([0-9]+)-([0-9]+)-([0-9]+)\.htm(.*)$ $1/bencandy\.php\?fid=$2&id=$3&page=$4
以上伪静态测试可用,如有疑问,可联系本网。