35DIR伪静态
Apache
<IfModule mod_rewrite.c> RewriteEngine On # BEGIN # 首页、分类浏览、数据归档、最近更新、排行榜、意见反馈 RewriteRule ^(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(\/?)$ index.php\?mod=$1 # 最近更新 RewriteRule ^update/(\d+)-(\d+)\.html$ index.php?mod=update&days=$1&page=$2 RewriteRule ^update/(\d+)\.html$ index.php?mod=update&days=$1 # 数据归档 RewriteRule ^archives/(\d+)-(\d+)\.html$ index.php?mod=archives&date=$1&page=$2 RewriteRule ^archives/(\d+)\.html$ index.php?mod=archives&date=$1 # 站内搜索 RewriteRule ^search/(name|url|tags|intro)/(.+)-(\d+)\.html$ index.php?mod=search&type=$1&query=$2&page=$3 RewriteRule ^search/(name|url|tags|intro)/(.+)\.html$ index.php?mod=search&type=$1&query=$2 # 站点详细 RewriteRule ^siteinfo/(\d+)\.html$ index.php?mod=siteinfo&wid=$1 # 文章详细 RewriteRule ^artinfo/(\d+)\.html$ index.php?mod=artinfo&aid=$1 # 链接列表 RewriteRule ^weblink/(\d+)\.html$ index.php?mod=weblink&page=$1 # 链接详细 RewriteRule ^linkinfo/(\d+)\.html$ index.php?mod=linkinfo&lid=$1 # 单页 RewriteRule ^diypage/(\d+)\.html$ index.php?mod=diypage&pid=$1 # RSS RewriteRule ^rssfeed/(webdir|article)-(\d+)\.html$ index.php?mod=rssfeed&type=$1&cid=$2 RewriteRule ^rssfeed/(webdir|article)\.html$ index.php?mod=rssfeed&type=$1 RewriteRule ^rssfeed\/(.+)/$ index.php\?mod=rssfeed&type=$1 RewriteRule ^rssfeed\/(.+)/(\d+)\.html$ index.php\?mod=rssfeed&type=$1&cid=$2 RewriteRule ^rssfeed\/(.+)$ index.php\?mod=rssfeed&type=$1 RewriteRule ^rssfeed\/(.+)/(\d+)$ index.php\?mod=rssfeed&type=$1&cid=$2 # SiteMap RewriteRule ^sitemap/(webdir|article)-(\d+)\.html$ index.php?mod=sitemap&type=$1&cid=$2 RewriteRule ^sitemap/(webdir|article)\.html$ index.php?mod=sitemap&type=$1 # 分类目录 RewriteRule ^webdir-(.+)-(\d+)-(\d+)\.html$ index.php\?mod=webdir&cid=$2&page=$3 RewriteRule ^webdir\/(.+)\/(\d+)-(\d+)\.html$ index.php\?mod=webdir&cid=$2&page=$3 RewriteRule ^webdir\/(.+)\/(\d+)/(\d+)$ index.php\?mod=webdir&cid=$2&page=$3 RewriteRule ^article-(.+)-(\d+)-(\d+)\.html$ index.php\?mod=article&cid=$2&page=$3 RewriteRule ^article\/(.+)\/(\d+)-(\d+)\.html$ index.php\?mod=article&cid=$2&page=$3 RewriteRule ^article\/(.+)\/(\d+)/(\d+)$ index.php\?mod=article&cid=$2&page=$3 # END </IfModule>
Nginx
rewrite ^/(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(/?)$ /index.php?mod=$1; rewrite ^/update/(\d+)\.html$ /index.php?mod=update&days=$1; rewrite ^/update/(\d+)-(\d+)\.html$ /index.php?mod=update&days=$1&page=$2; rewrite ^/archives/(\d+)\.html$ /index.php?mod=archives&date=$1; rewrite ^/archives/(\d+)-(\d+)\.html$ /index.php?mod=archives&date=$1&page=$2; rewrite ^/search/(name|url|tags|intro|br|pr|art)/(.+)-(\d+)\.html$ /index.php?mod=search&type=$1&query=$2&page=$3; rewrite ^/search/(name|url|tags|intro|br|pr|art)/(.+)\.html$ /index.php?mod=search&type=$1&query=$2; rewrite ^/(br|pr)/(.+)-(\d+)\.html$ /index.php?mod=search&type=$1&query=$2&page=$3; rewrite ^/(br|pr)/(.+)\.html$ /index.php?mod=search&type=$1&query=$2; rewrite ^/view/(\d+)\.html$ /index.php?mod=siteinfo&wid=$1; rewrite ^/siteinfo/(\d+)\.html$ /index.php?mod=siteinfo&wid=$1; rewrite ^/siteinfo-(\d+)\.html$ /index.php?mod=siteinfo&wid=$1; rewrite ^/site/(\d+)-(.+)(/?)\.html$ /index.php?mod=siteinfo&wid=$1; rewrite ^/artinfo/(\d+)\.html$ /index.php?mod=artinfo&aid=$1; rewrite ^/linkinfo/(\d+)\.html$ /index.php?mod=linkinfo&lid=$1; rewrite ^/diypage/(\d+)\.html$ /index.php?mod=diypage&pid=$1; rewrite ^/rssfeed/(\d+)\.html$ /index.php?mod=rssfeed&cid=$1; rewrite ^/sitemap/(\d+)\.html$ /index.php?mod=sitemap&cid=$1; rewrite ^/webdir/(.+)/(\d+)\.html$ /index.php?mod=webdir&cid=$2; rewrite ^/webdir/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=webdir&cid=$2&page=$3; rewrite ^/webdir/(.+)/(\d+)-(.+)-(\d+)\.html$ /index.php?mod=webdir&cid=$2&sort=$3&page=$4; rewrite ^/weblink/(.+)/(\d+)\.html$ /index.php?mod=weblink&cid=$2; rewrite ^/weblink/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=weblink&cid=$2&page=$3; rewrite ^/weblink/(.+)/(\d+)-(.+)-(\d+)\.html$ /index.php?mod=weblink&cid=$2&sort=$3&page=$4; rewrite ^/article/(.+)/(\d+)\.html$ /index.php?mod=article&cid=$2; rewrite ^/article/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=article&cid=$2&page=$3; rewrite ^/rssfeed/webdir/ /index.php?mod=rssfeed&type=webdir; rewrite ^/rssfeed/article/ /index.php?mod=rssfeed&type=article; rewrite ^/rssfeed/(.+)/(\d+)\.html$ /index.php?mod=rssfeed&cid=$2; rewrite ^/rssfeed/(.+)/(\d+)/(\d+)\.html$ /index.php?mod=rssfeed&cid=$2&page=$3; rewrite ^/rssfeed/(.+)/(\d+)-(\d+)\.html$ /index.php?mod=rssfeed&cid=$2&page=$3;
Nginx可能会有些页面会出现404的问题,给我留言