DBMNG数据库管理与应用

抓住自己最有兴趣的东西,由浅入深,循序渐进地学……
当前位置:首页 > 服务器配置 > IIS&ASP

IISRewrite系统常用伪静态规则[httpd.ini]

涵盖了康盛所有主打产品,从Discuz!5.5到7.0、SS等;性能十分稳定的PHPWIND,商城有SHOPEX、ECSHOP(还是康盛的,据传是康盛把早先的合作商SHOPEX踢掉,自己搞了个ECSHOP,感觉很不厚道,但是用户群多,推出新产品很快会被接受);博客当然少不了wordpress喽!


Discuz!5.5

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# 注意是Discuz5.5 Rewrite规则

RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index\.php\?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro\.php\?$2=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space\.php\?$2=$3

# SupeSite Rewrite规则

# 独立主机用户
# 修改以下语句中的 /SupeSite  修改为你的SupeSite目录地址,如果程序放在根目录中,请将 /SupeSite  删除

RewriteRule ^/([0-9]+)/spacelist(.*)$ /index\.php\?$1/action_spacelist$2
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?$1/action_viewspace_itemid$2
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?$1/action_viewbbs_tid$2
RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?$1/$2
RewriteRule ^/([0-9]+)$ /index\.php\?$1
RewriteRule ^/action(.+)$ /index\.php\?action$1
RewriteRule ^/category_(.+)$ /index\.php\?action_category_catid_$1
RewriteRule ^/itemlist_(.+)$ /index\.php\?action_itemlist_catid_$1
RewriteRule ^/viewnews_(.+)$ /index\.php\?action_viewnews_itemid_$1
RewriteRule ^/viewthread_(.+)$ /index\.php\?action_viewthread_tid_$1
RewriteRule ^/index([\.a-zA-Z0-9]*)$ /index\.php

Discuz!6.0

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# DISCUZ论坛+UCHome Rewrite规则,针对可操作IIS用户,
# 此默认规则只针对UCHome程序放在根目录中用独立域名访问的,论坛也可以直接用.
# 注意是Discuz6.0 Rewrite规则

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

RewriteRule ^/(space|network)-(.+)\.html$ /$1\.php\?rewrite=$2 [L]
RewriteRule ^/(space|network)\.html$ /$1\.php [L]
RewriteRule ^/([0-9]+)$ /space\.php\?uid=$1 [L]

DZ6.0+DZ6.1论坛+UCHome

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# DZ6.0/6.1论坛+UCHome Rewrite规则,针对可操作IIS用户,
# 此默认规则只针对UCHome程序放在根目录中用独立域名访问的,论坛也可以直接用.

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

RewriteRule ^/(space|network)-(.+)\.html$ /$1\.php\?rewrite=$2 [L]
RewriteRule ^/(space|network)\.html$ /$1\.php [L]
RewriteRule ^/([0-9]+)$ /space\.php\?uid=$1 [L]

针对UCHome程序放在二级目录中访问的

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# 本作品由服务器合租论坛提供技术支持: http://www.idc9.net
# DZ6.0/6.1论坛+UCHome Rewrite规则,针对可操作IIS用户,论坛与UCH可以共享使用此规则,两种情况如下:
# 1.如果程序放在二级目录中访问,请将以下语句中所有uchome修改为你的二级目录名字就可.
# 2.如果程序放在根目录中访问,请将以下语句中所有/uchome删除就可,最后都要保存修改重启IIS.

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

RewriteRule ^/uchome/(space|network)-(.+)\.html$ /uchome/$1\.php\?rewrite=$2 [L]
RewriteRule ^/uchome/(space|network)\.html$ /uchome/$1\.php [L]
RewriteRule ^/uchome/([0-9]+)$ /uchome/space\.php\?uid=$1 [L]

Discuz!6.1

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# DISCUZ论坛+UCHome Rewrite规则,针对可操作IIS用户,
# 注意是Discuz6.1 Rewrite规则

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

RewriteRule ^/(space|network)-(.+)\.html$ /$1\.php\?rewrite=$2 [L]
RewriteRule ^/(space|network)\.html$ /$1\.php [L]
RewriteRule ^/([0-9]+)$ /space\.php\?uid=$1 [L]

Discuz!7.0

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
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

SupeSite[SS]

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# 注意是 SupeSite Rewrite规则
# 独立主机用户
# 修改以下语句中的 /supesite 修改为你的SupeSite目录地址,如果程序放在根目录中,请将 /supesite 修改为 /

RewriteRule ^/([0-9]+)$ /index\.php\?uid/$1 [L]
RewriteRule ^/([0-9]+)/spacelist(.+)$ /index\.php\?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?uid/$1/action/viewbbs/tid$2 [L]
RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?uid/$1/$2 [L]

RewriteRule ^/action(.+)$ /index\.php\?action$1 [L]
RewriteRule ^/category(.+)$ /index\.php\?action/category/catid$1 [L]
RewriteRule ^/viewnews(.+)$ /index\.php\?action/viewnews/itemid$1 [L]
RewriteRule ^/viewthread(.+)$ /index\.php\?action/viewthread/tid$1 [L]
RewriteRule ^/mygroup(.+)$ /index\.php\?action/mygroup/gid$1 [L]

ecshop

[ISAPI_Rewrite]

# 注意是ecshop Rewrite规则
# 请将下面的语句前的#号去掉,并将(?:www\.)?site1\.com改为商店所在域名

RewriteCond Host:   (?:www\.)?site1\.com

RewriteRule ^(.*)/index.html$                $1/index.php          [I]
RewriteRule ^(.*)/category$                  $1/index.php          [I]
RewriteRule ^(.*)/feed-c([0-9]+).xml$        $1/feed.php?cat=$2    [I]
RewriteRule ^(.*)/feed-b([0-9]+).xml$        $1/feed.php?brand=$2  [I]
RewriteRule ^(.*)/feed.xml$                  $1/feed.php           [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$  $1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9 [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)\.html$                          $1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6                          [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 ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$                                $1/category.php?id=$2&brand=$3&page=$4                                                           [I]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$                                  $1/category.php?id=$2&brand=$3                                                                   [I]
RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$                               $1/category.php?id=$2                              [I]
RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html$                                  $1/goods.php?id=$2                                 [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 ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$                   $1/article_cat.php?id=$2&page=$3                   [I]
RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html$                            $1/article_cat.php?id=$2                           [I]
RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$                                $1/article.php?id=$2                               [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 ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html                $1/brand.php?id=$2&cat=$3&page=$4                  [I]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html                         $1/brand.php?id=$2&cat=$3                          [I]
RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html                                   $1/brand.php?id=$2                                 [I]
RewriteRule ^(.*)/tag-(.*)\.html                                             $1/search.php?keywords=$2                          [I]
RewriteRule ^(.*)/snatch-([0-9]+)\.html$                                      $1/snatch.php?id=$2                                [I]
RewriteRule ^(.*)/group_buy-([0-9]+)\.html$                                   $1/group_buy.php?act=view&id=$2                    [I]

phpwind6.0

[ISAPI_Rewrite]
# 注意是phpwind6.0规则
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]

shopex

[ISAPI_Rewrite]

# 注意是shopex Rewrite规则
# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2

wordpress2.5版本

[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

[ISAPI_Rewrite]

# 注意是wordpress2.5版本规则

RewriteRule /php /phpinfo
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /(aboutme|works|resources|guestbook|archives|sitemap|links|works|pluginsused)/ /index.php\?pagename=$1
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /index.php\/wp-feed.php\?category_name=$1&feed=$2
RewriteRule /category/?(.*)/ /index.php\?category_name=$1

RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /index.php\/wp-feed.php\?author_name=$1&feed=$2
RewriteRule /author/?(.*) /index.php\?author_name=$1

RewriteRule /feed/?$ /index.php\?feed=rss2
RewriteRule /comments/feed/?$ /index.php\?feed=comments-rss2

RewriteRule /page/(.*)/ /index.php\?paged=$1
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&feed=$5
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/trackback/?$ /index.php\/wp-trackback.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1

RewriteRule /sitemap/(.*)/ /index.php\?page_id=3&pg=$1

转载请注明:在路上 » IISRewrite系统常用伪静态规则[httpd.ini]

本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号