一个适用于Sablog的一个htaccess
时间:2008-08-21 来源:level
在网上看到的,丰富了部分功能,拿来参考一下,也许有天用得上。
PHP代码
# BEGIN Sablog-X Rewrite
RewriteEngine On
# 文章
RewriteRule ^(.*)/show-([0-9]+)-([0-9]+)\.html$ $1/index.php?action=show&id=$2&page=$3 [L]
# 分类
RewriteRule ^(.*)/category-([0-9]+)-([0-9]+)\.html$ $1/index.php?action=index&cid=$2&page=$3 [L]
# 只带月份的归档
RewriteRule ^(.*)/archives-([0-9]+)-([0-9]+)\.html$ $1/index.php?action=index&setdate=$2&page=$3 [L]
# 用户列表、高级搜索、注册、登陆
RewriteRule ^(.*)/(archives|search|reg|login|index|links)\.html$ $1/index.php?action=$2 [L]
# 评论列表、标签列表、引用列表 带分页
RewriteRule ^(.*)/(comments|tagslist|trackbacks|index)-([0-9]+)\.html$ $1/index.php?action=$2&page=$3 [L]
# 具体评论规则
RewriteRule ^(.*)/comments-([0-9]+)-([0-9]+)\.html$ $1/index.php?action=show&id=$2&cmid=$3&goto=newcm [L]
# 具体标签规则
RewriteRule ^(.*)/(.*)-([0-9]+)\.html$ $1/index.php?action=tags&item=$2&page=$3 [L]
# google map规则
RewriteRule ^(.*)/sitemap\.xml$ $1/sitemap.php [L]
# END Sablog-X
相关阅读 更多 +