欢迎您加入789分类目录! (我要快速审核) (我要上推荐位
当前位置:789分类目录 » 站长资讯 » 站长运营 » 文章详细 订阅RssFeed

35dir分类目录网站的伪静态规则目录和文件型模式

来源:天狐博客 浏览:195次 时间:2015-06-20

目录和文件型模式是35dir伪静态的主要方式。昨天转移空间结果伪静态全部失效了,于是怎么都没有修改成功。于是果断在网上参考了以下并对原代码加以修改:


    # BEGIN
RewriteEngine On
# 首页、分类浏览、数据归档、最近更新、排行榜、意见反馈
RewriteRule ^(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(\.html)$ index.php\?mod=$1&%1
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+)-(\d+)\.html$ index.php\?mod=update&days=$1&page=$2
RewriteRule ^update\/(\d+)/(\d+)$ index.php\?mod=update&days=$1&page=$2


# 数据归档
RewriteRule ^archives-(\d+)-(\d+)\.html$ index.php\?mod=archives&date=$1&page=$2
RewriteRule ^archives\/(\d+)-(\d+)\.html$ index.php\?mod=archives&date=$1&page=$2
RewriteRule ^archives\/(\d+)/(\d+)$ index.php\?mod=archives&date=$1&page=$2


# 站内搜索
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 ^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 ^search\/(name|url|tags|intro)\/(.+)/(\d+)$ index.php\?mod=search&type=$1&query=$2&page=$3
RewriteRule ^search\/(name|url|tags|intro)\/(.+)$ index.php\?mod=search&type=$1&query=$2


# 站点详细
RewriteRule ^siteinfo-(\d+)\.html$ index.php\?mod=siteinfo&wid=$1
RewriteRule ^siteinfo\/(\d+)\.html$ index.php\?mod=siteinfo&wid=$1
RewriteRule ^siteinfo\/(\d+)$ index.php\?mod=siteinfo&wid=$1


# 文章详细
RewriteRule ^artinfo-(\d+)\.html$ index.php\?mod=artinfo&aid=$1
RewriteRule ^artinfo\/(\d+)\.html$ index.php\?mod=artinfo&aid=$1
RewriteRule ^artinfo\/(\d+)$ index.php\?mod=artinfo&aid=$1


# 链接详细
RewriteRule ^linkinfo-(\d+)\.html$ index.php\?mod=linkinfo&lid=$1
RewriteRule ^linkinfo\/(\d+)\.html$ index.php\?mod=linkinfo&lid=$1
RewriteRule ^linkinfo\/(\d+)$ index.php\?mod=linkinfo&lid=$1


# 单页
RewriteRule ^diypage-(\d+)\.html$ index.php\?mod=diypage&pid=$1
RewriteRule ^diypage\/(\d+)\.html$ index.php\?mod=diypage&pid=$1
RewriteRule ^diypage\/(\d+)$ index.php\?mod=diypage&pid=$1


# RSS
RewriteRule ^rssfeed-(.+)-(\d+)\.html$ index.php\?mod=rssfeed&type=$1&cid=$2
RewriteRule ^rssfeed-(.+)\.html$ index.php\?mod=rssfeed&type=$1&cid=$2


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-(.+)\.html$ index.php\?mod=sitemap&cid=$1
RewriteRule ^sitemap\/(\d+)\/$ index.php\?mod=sitemap&cid=$1
RewriteRule ^sitemap\/(\d+)$ index.php\?mod=sitemap&cid=$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
这里你只需要用以上代码重新建立一个.htaccess文件覆盖根目录的该文件即可。

推荐站点

  • 五洲会海购五洲会海购

    五洲会,官方认证,正品保证,进口商品海外购物商城。轻松购遍海外进口母婴,进口保健,进口美妆等,100%原装进口,海外直采,保税发货,国内售后,网购海外商品有保障。海淘购物首选,五洲会

    www.wzhouhui.com
  • 药方大全网药方大全网

    本站为您搜集整理了大量的验方偏方秘方古方等中药方(中药方剂)八万多个。你是你自己的中医,我是你的中药方!中医中药秘方网,偏方大全愿为您的健康保驾护航。

    www.zhongyf.com
  • 窝读谷中文网窝读谷中文网

    窝读谷中文网是质量最好的中文小说网站,提供奇幻玄幻,武侠仙侠,历史军事,游戏竞技,都市青春言情,科幻灵异悬疑等中文免费小说全文阅读与小说txt下载。

    www.wodugu.com
  • 西瓜电影西瓜电影

    一一影视网(www.yjytv.com)第一时间为你提供西瓜影音2015最新电影大全,最新好看的2015好看的电影电视剧排行榜西瓜影音电影免费在线观看,更新最快的西瓜影音电影电视剧网站!

    www.yjytv.com
  • 宋小宝小品搞笑大全宋小宝小品搞笑大全

    我爱小宋网(www.5ixiaosong.com)为广大热爱宋小宝的网友提供最新热门的宋小宝小品全集,小品搞笑大全宋小宝,宋小宝综艺节目等宋小宝小品搞笑大全视频在线观看,另外还提供2015宋小宝最新小品MP3下载。

    www.5ixiaosong.com
  • MCM中国官网MCM中国官网

    广州白云世界皮具贸易中心mcm高仿,专业一比一,原版mcm包包,高仿mcm背包,MCM官网,mcm韩国官网,街拍mcm双肩包,鹿晗同款mcm双肩包,鹿晗mcm双肩包,高仿mcm包包,mcm包包! zjgzrh (15:13:53):

    www.10086mcm.com