最全的伪静态规则和设置方法.docx

上传人:b****5 文档编号:8845298 上传时间:2023-05-15 格式:DOCX 页数:10 大小:17.36KB
下载 相关 举报
最全的伪静态规则和设置方法.docx_第1页
第1页 / 共10页
最全的伪静态规则和设置方法.docx_第2页
第2页 / 共10页
最全的伪静态规则和设置方法.docx_第3页
第3页 / 共10页
最全的伪静态规则和设置方法.docx_第4页
第4页 / 共10页
最全的伪静态规则和设置方法.docx_第5页
第5页 / 共10页
最全的伪静态规则和设置方法.docx_第6页
第6页 / 共10页
最全的伪静态规则和设置方法.docx_第7页
第7页 / 共10页
最全的伪静态规则和设置方法.docx_第8页
第8页 / 共10页
最全的伪静态规则和设置方法.docx_第9页
第9页 / 共10页
最全的伪静态规则和设置方法.docx_第10页
第10页 / 共10页
亲,该文档总共10页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

最全的伪静态规则和设置方法.docx

《最全的伪静态规则和设置方法.docx》由会员分享,可在线阅读,更多相关《最全的伪静态规则和设置方法.docx(10页珍藏版)》请在冰点文库上搜索。

最全的伪静态规则和设置方法.docx

最全的伪静态规则和设置方法

最近陆续有很多站长过来询问伪静态的问题,现就分享下目前网上流行的各种程序在iis下的规则和设置方法:

  1、shopex4.8

  下载3.0的免费Rewrite组件

  按照默认路径安装后,打开C:

\ProgramFiles\Helicon\ISAPI_Rewrite3\httpd.conf

  加入以下规则:

  #HeliconISAPI_Rewriteconfigurationfile

  #Version3.1.0.56

  RewriteBase/

  RewriteCond%{REQUEST_FILENAME}\.(html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|cgi|shtml|shtm|phtm|xml)$

  RewriteCond%{REQUEST_FILENAME}!

-f

  RewriteCond%{REQUEST_FILENAME}!

-d

  RewriteRule^(.*)$index.php?

$1[L]

  [ISAPI_Rewrite]

  #3600=1hour

  CacheClockRate3600

  RepeatLimit32

  #Protecthttpd.iniandhttpd.parse.errorsfiles

  #fromaccessingthroughHTTP

  RewriteRule^(.*)/archiver/((fid|tid)-[0-9]+\.html)\?

*(.*)$$1/archiver/index\.php\?

$2&$4

  RewriteRule^(.*)/forum-([0-9]+)-([0-9]+)\.html\?

*(.*)$$1/forumdisplay\.php\?

fid=$2&page=$3&$4

  RewriteRule^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?

*(.*)$$1/viewthread\.php\?

tid=$2&extra=page\%3D$4&page=$3&$4

  RewriteRule^(.*)/space-(username|uid)-(.+)\.html\?

*(.*)$$1/space\.php\?

$2=$3&$4

  RewriteRule^(.*)/tag-(.+)\.html\?

*(.*)$$1/tag\.php\?

name=$2&$3

  下面就需要配置iis为shopex4.8加载组件了:

  打开iis,右键你的站点属性--ISAPI筛选器--添加--筛选器名称是ISAPI_Rewrite3--可执行文件就是ISAPI_Rewrite.dll的路径,比如C:

\ProgramFiles\Helicon\ISAPI_Rewrite3\ISAPI_Rewrite.dll

  最后重启iis

  当然你可以把ISAPI_Rewrite3目录放入站点根目录下,但记得要给一个users读权限。

如果都设置了还不行,可为网站跟目录加一个“networkservice”的读权限。

  注意:

有些服务器或者vps有做权限的,安装后httpd.conf可能只有everyone和system的权限,如果修改不了文件就添加一个administrator的权限。

  2、Discuz6+ecshop

  规则如下:

  [ISAPI_Rewrite]

  #3600=1hour

  CacheClockRate3600

  RepeatLimit32

  #Protecthttpd.iniandhttpd.parse.errorsfiles

  #fromaccessingthroughHTTP

  RewriteCond%{HTTP_HOST}

  RewriteRule/index.html/index.php[I]

  RewriteRule/default.html/index.php[I]

  RewriteRule/feed.xml/feed.php[I]

  RewriteRule/category-([0-9]+).html/category\.php\?

id=$1[I]

  RewriteRule/category-([0-9]+)-([0-9]+).html/category\.php\?

id=$1&page=$2[I]

  RewriteRule/category-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html/category\.php\?

id=$1&page=$2&sort=$3&order=$4[I]

  RewriteRule/goods-([0-9]+)\.html/goods\.php\?

id=$1[I]

  RewriteRule/article_cat-([0-9]+).html/article_cat\.php\?

id=$1[I]

  RewriteRule/article_cat-([0-9]+)-([0-9]+).html/article_cat\.php\?

id=$1&page=$2[I]

  RewriteRule/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html/article_cat\.php\?

id=$1&page=$2&sort=$3&order=$4[I]

  RewriteRule/article-([0-9]+).html/article\.php\?

id=$1[I]

  RewriteRule/search-b([0-9]+)/search\.php\?

brand=$1[I]

  RewriteRule/search-([0-9]+)-([^-]*)-([a-zA-Z]+)-k(.*).html/search\.php\?

page=$1&sort=$2&order=$3&keywords=$4[I]

  RewriteRule/search-([0-9]+)-([^-]*)-([a-zA-Z]+)-b([0-9]*)-k(.*)-s([0-9]*)-l([0-9]*).html/search\.php\?

page=$1&sort=$2&order=$3&brand=$4&keywords=$5&min_price=$6&max_price=$7[I]

  #discuz

  RewriteRule^(.*)/archiver/((fid|tid)-[\w\-]+\.html)\?

*(.*)$$1/archiver/index\.php\?

$2&$4

  RewriteRule^(.*)/forum-([0-9]+)-([0-9]+)\.html\?

*(.*)$$1/forumdisplay\.php\?

fid=$2&page=$3&$4

  RewriteRule^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?

*(.*)$$1/viewthread\.php\?

tid=$2&extra=page\%3D$4&page=$3&$4

  RewriteRule^(.*)/space-(username|uid)-(.+)\.html\?

*(.*)$$1/space\.php\?

$2=$3&$4

  RewriteRule^(.*)/tag-(.+)\.html\?

*(.*)$$1/tag\.php\?

name=$2&$3

  然后配置iis加载组件,方法类似shopex4.8:

  打开iis,右键你的站点属性--ISAPI筛选器--添加--筛选器名称是Rewrite--可执行文件就是Rewrite.dll的路径,比如E:

\home\LocalUser\rewrite\Rewrite.dll

  最后重启iis

  3、discuz

  规则如下:

  [ISAPI_Rewrite]

  #3600=1hour

  CacheClockRate3600

  RepeatLimit32

  #Protecthttpd.iniandhttpd.parse.errorsfiles

  #fromaccessingthroughHTTP

  RewriteRule^(.*)/archiver/([a-z0-9\-]+\.html)\?

*(.*)$$1/archiver/index\.php\?

$2&$3

  RewriteRule^(.*)/forum-([0-9]+)-([0-9]+)\.html\?

*(.*)$$1/forumdisplay\.php\?

fid=$2&page=$3&$4

  RewriteRule^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?

*(.*)$$1/viewthread\.php\?

tid=$2&extra=page\%3D$4&page=$3&$4

  RewriteRule^(.*)/profile-(username|uid)-(.+)\.html\?

*(.*)$$1/viewpro\.php\?

$2=$3&$4

  RewriteRule^(.*)/space-(username|uid)-(.+)\.html\?

*(.*)$$1/space\.php\?

$2=$3&$4

  打开iis,右键你的站点属性--ISAPI筛选器--添加--筛选器名称是Rewrite--可执行文件就是Rewrite.dll的路径,比如E:

\home\LocalUser\rewrite\Rewrite.dll

  最后重启iis

  4、ecshop

  规则如下:

  [ISAPI_Rewrite]

  #ECSHOP

  RewriteRule/index.html/index.php[I]

  RewriteRule/default.html/index.php[I]

  RewriteRule/ecshop/feed.xml/ecshop/feed.php[I]

  #RewriteRule/ecshop/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$/ecshop/category.php?

id=$1&brand=$2&page=$3&sort=$4&order=$5[I]

  RewriteRule^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$$1/category\.php\?

id=$2&brand=$3&page=$4&sort=$5&order=$6[I]

  #RewriteRule/ecshop/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$/ecshop/category.php?

id=$1&brand=$2&page=$3[I]

  RewriteRule^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$$1/category\.php\?

id=$2&brand=$3&page=$4[I]

  #RewriteRule/ecshop/category-([0-9]+)-b([0-9]+)(.*)\.html$/ecshop/category.php?

id=$1&brand=$2[I]

  RewriteRule^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$$1/category\.php\?

id=$2&brand=$3[I]

  #RewriteRule/ecshop/category-([0-9]+)(.*)\.html$/ecshop/category.php?

id=$1[I]

  RewriteRule^(.*)/category-([0-9]+)(.*)\.html$$1/category\.php\?

id=$2[I]

  #RewriteRule/ecshop/goods-([0-9]+)(.*)\.html$/ecshop/goods.php?

id=$1[I]

  RewriteRule^(.*)/goods-([0-9]+)(.*)\.html$$1/goods\.php\?

id=$2

  #RewriteRule/ecshop/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$/ecshop/article_cat.php?

id=$1&page=$2&sort=$3&order=$4[I]

  RewriteRule^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$$1/article_cat\.php\?

id=$2&page=$3&sort=$4&order=$5[I]

  #RewriteRule/ecshop/article_cat-([0-9]+)-([0-9]+)(.*)\.html$/ecshop/article_cat.php?

id=$1&page=$2[I]

  RewriteRule^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$$1/article_cat\.php\?

id=$2&page=$3[I]

  #RewriteRule/ecshop/article_cat-([0-9]+)(.*)\.html$/ecshop/article_cat.php?

id=$1[I]

  RewriteRule^(.*)/article_cat-([0-9]+)(.*)\.html$$1/article_cat\.php\?

id=$2[I]

  #RewriteRule/ecshop/article-([0-9]+)(.*)\.html$/ecshop/article.php?

id=$1[I]

  RewriteRule^(.*)/article-([0-9]+)(.*)\.html$$1/article\.php\?

id=$2[I]

  #RewriteRule/ecshop/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html/ecshop/brand.php?

id=$1&cat=$2&page=$3&sort=$4&order=$5[I]

  RewriteRule^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$1/brand\.php\?

id=$2&cat=$3&page=$4&sort=$5&order=$6[I]

  #RewriteRule/ecshop/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html/ecshop/brand.php?

id=$1&cat=$2&page=$3[I]

  RewriteRule^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html$1/brand\.php\?

id=$2&cat=$3&page=$4[I]

  #RewriteRule/ecshop/brand-([0-9]+)-c([0-9]+)(.*)\.html/ecshop/brand.php?

id=$1&cat=$2[I]

  RewriteRule^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html$1/brand\.php\?

id=$2&cat=$3[I]

  #RewriteRule/ecshop/brand-([0-9]+)(.*)\.html/ecshop/brand.php?

id=$1[I]

  RewriteRule^(.*)/brand-([0-9]+)(.*)\.html$1/brand\.php\?

id=$2[I]

  #RewriteRule/ecshop/tag-(.*)\.html/ecshop/search.php?

keywords=$1[I]

  RewriteRule^(.*)/tag-(.*)\.html$1/search\.php\?

keywords=$2[I]

  5、dvbbs

  规则如下:

  [ISAPI_Rewrite]

  #3600=1hour

  CacheClockRate3600

  RepeatLimit32

  #Blockexternalaccesstothehttpd.iniandhttpd.parse.errorsfiles

  RewriteRule/httpd(?

:

\.ini|\.parse\.errors).*/[F,I,O]

  #BlockexternalaccesstotheHelperISAPIExtension

  RewriteRule.*\.isrwhlp/[F,I,O]

  #重写index.asp

  RewriteRule/(你的论坛所在目录,以根目录起)/index_(\d+)_(.*)_(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/index\.asp\?

boardid=$1&action=$2&topicmode=$3&page=$4[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/index_(\d+)_(\d+)_(.*)\.html/(你的论坛所在目录,以根目录起)/index\.asp\?

boardid=$1&page=$2&action=$3[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/index_(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/index\.asp\?

boardid=$1&topicmode=$2[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/index_(\d+)_(\d+)_\.html/(你的论坛所在目录,以根目录起)/index\.asp\?

boardid=$1&page=$2[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/index_(\d+)__\.html/(你的论坛所在目录,以根目录起)/index\.asp\?

boardid=$1[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/index_(\d+)\.html/(你的论坛所在目录,以根目录起)/index\.asp\?

boardid=$1[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/index\.html(.*)/(你的论坛所在目录,以根目录起)/index.asp[N,I]

  #重写dispbbs.asp

  RewriteRule/(你的论坛所在目录,以根目录起)/dispbbs_(\d+)_(\d+)_(\d+)_skin(\d+)_(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/dispbbs\.asp\?

boardid=$1&replyid=$2&id=$3&skin=$4&page=$5&star=$6[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dispbbs_(\d+)_(\d+)_(\d+)_skin(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/dispbbs\.asp\?

boardid=$1&replyid=$2&id=$3&skin=$4&star=$5[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dispbbs_(\d+)_(\d+)_(\d+)_skin(\d+)\.html/(你的论坛所在目录,以根目录起)/dispbbs.asp\?

boardID=$1&replyid=$2&ID=$3&skin=$4[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dispbbs_(\d+)_(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/dispbbs.asp\?

boardID=$1&ID=$2&page=$3[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dispbbs_(\d+)_(\d+)_(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/dispbbs.asp\?

boardID=$1&ID=$2&star=$3&page=$4[N,I]

  #重写dv_rss.asp

  RewriteRule/(你的论坛所在目录,以根目录起)/dv_rss_(.*)_(\d+)_(\d+)_(\d+)_(\d+)_count(\d+)\.html/(你的论坛所在目录,以根目录起)/dv_rss.asp\?

s=$1&boardid=$2&id=$3&page=$4&star=$5&count=$6[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dv_rss_(.*)_(\d+)_(\d+)_(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/dv_rss.asp\?

s=$1&boardid=$2&id=$3&page=$4&star=$5[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dv_rss_(.*)_(\d+)_(\d+)_(\d+)\.html/(你的论坛所在目录,以根目录起)/dv_rss.asp\?

s=$1&boardid=$2&id=$3&page=$4[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dv_rss_(.*)_(\d+)_(\d+)_count(\d+)\.html/(你的论坛所在目录,以根目录起)/dv_rss.asp\?

s=$1&boardid=$2&page=$3&count=$4[N,I]

  RewriteRule/(你的论坛所在目录,以根目录起)/dv_rss_(.

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2