静态页面对搜索引擎的收录有好处,主要是因为搜索引擎对太复杂的动态地址不“认识”的缘故。
下面发个BO-BLOG伪静态页面的代码,希望有需要的人自己下了。
RewriteEngine on
RewriteBase //
RewriteRule ^post/([0-9]+).htm$ read.php?$1
RewriteRule ^post/([0-9]+)_([0-9]+).htm$ read.php?$1&page=$2
RewriteRule ^post/([0-9]+)_([0-9]+)_([0-9]+).htm$ read.php?$1&page=$2&part=$3
RewriteRule ^index_([0-9]+)_([0-9]+).htm$ index.php?mode=$1&page=$2
RewriteRule ^star_([0-9]+)_([0-9]+).htm$ star.php?mode=$1&page=$2
RewriteRule ^category_([0-9]+).htm$ index.php?go=category_$1
RewriteRule ^category_([0-9]+)_([0-9]+)_([0-9]+).htm$ index.php?go=category_$1&mode=$2&page=$3
RewriteRule ^archive_([0-9]+)_([0-9]+).htm$ index.php?go=archive&cm=$1&cy=$2
RewriteRule ^archive_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).htm$ index.php?go=archive&cm=$1&cy=$2&mode=$3&page=$4
RewriteRule ^showday_([0-9]+)_([0-9]+)_([0-9]+).htm$ index.php?go=showday_$1-$2-$3
RewriteRule ^showday_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).htm$ index.php?go=showday_$1-$2-$3&mode=$4&page=$5
RewriteRule ^tag/(.+)$ tag.php?tag=$1&rewrite=1
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
PS:上面红色的代码是,关闭服务器关键词过滤的代码。请把以上代码保存为.htaccess文件上传入你的BLOG所在的文件夹。