QQ登录 | 联系我们 | 招聘信息 | 支付方式 | 客服问答 | 托管租用须知 | ICP备案 | 返回首页  
 
  [合租服务器] 二十人合租
  [合租服务器] 十人合租
     (百独服务器,独享10M带宽)
  [合租服务器] 二十人合租
     (国外,免备案)
  国内 VPS 服务器
  国外 VPS 服务器
     (国外,免备案)
  服务器下载及IP测试
  常用软件与文档、合同下载
  机房介绍
  什么是合租服务器?
  什么是 VPS 主机?
  为什么会Service Unavailable?
  怎么自定义伪静态规则?
  用户控制面板
  独立控制面板
Isapi_rewrite自定伪静态规则相关说明
添加时间:2010-05-12  录入:admin
如果没有您要了解的内容,您可以点击本链接在线提交咨询。我们会第一时间答复您!
搜索关键词(回车提交):
我司至2010年5月1号开始,对 vhost6 合租服务器提供自定伪静态规则功能;5月25号开始,将对我司所有合租服务器全部提供支持;如果您的合租服务器采用的是WINDOWS 2008系统,也可自助使用IIS7自有组件支持服务,请访问下列地址查看:
Quote:
只要您把自定规则写进http.ini,然后上传至网站根目录即可。
http.ini内容视例如下:
code:
RewriteEngine on
RewriteBase
# 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
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
其中首两行:
code:
RewriteEngine on
RewriteBase
为必须项,其余内容可自定。

如果您网站绑定了多个域名,但只想其中某个域名使用规则,可以这样:
code:
RewriteCond %{HTTP:Host} ^(?:www.)?jie-xin\.cn$
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4
每条规则对应一条RewriteCond语句


如果有不清楚的,可联系在线技术客服。详细的规则说明和教程,可查看:http://www.isapirewrite.com/docs/

附:
“Discuz X1” 规则:
code:
RewriteEngine on
RewriteBase
#Discuz X1
RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
RewriteRule ^(.*)/article-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=article&articleid=$2&$3
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4
"Discuz X1.5" 规则:
code:
RewriteEngie on
RewriteBase
#Discuz X1.5
RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=view&aid=$2&page=$3&$4
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4
"Discuz X2.0" 规则:
code:
RewriteEngie on
RewriteBase
#Discuz X2.0
RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=view&aid=$2&page=$3&$4
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/home\.php\?mod=space&uid=$2&do=blog&id=$3
RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4
"Phpwind 7.x" 规则:
code:
RewriteEngine on
RewriteBase
#Phpwind
RewriteRule ^(.*)/tbe(.*)_(.*)$ $1/thread.php?fid=$2&page=$3
RewriteRule ^(.*)/tbe(.*)$ $1/thread.php?fid=$2&page=$3
RewriteRule ^(.*)/mv(.*)_(.*)_(.*)$ $1/read.php?tid=$2&page=$3&fpage=$4
RewriteRule ^(.*)/mv(.*)_(.*)$ $1/read.php?tid=$2&page=$3&fpage=$4
RewriteRule ^(.*)/mv(.*)$ $1/read.php?tid=$2
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2
"ShopEX" 规则:
code:
RewriteEngine on
RewriteBase
#Shopex
RewriteRule /index.html /index.php
RewriteRule /default.html /index.php
RewriteRule /bulletin.html /index.php?gOo=article_list.dwt&acat=1
RewriteRule /bulletin_([0-9]+).html /index.php?gOo=article_list.dwt&acat=1&p=$1
RewriteRule /catalog.html /index.php?gOo=goods_category.dwt
RewriteRule /list.html /index.php?gOo=goods_search_list.dwt
RewriteRule /list_([0-9]+).html /index.php?gOo=goods_search_list.dwt&p=$1
RewriteRule /member.html /index.php?gOo=member_home.dwt
RewriteRule /faq.html /index.php?gOo=help.dwt&acat=2
RewriteRule /faq_([0-9]+).html /index.php?gOo=help.dwt&acat=2&p=$1
RewriteRule /safe.html /index.php?gOo=help_safe.dwt
RewriteRule /howtobuy.html /index.php?gOo=help_buystep.dwt
RewriteRule /howtopay.html /index.php?gOo=help_send.dwt
RewriteRule /contactus.html /index.php?gOo=help_contact.dwt
RewriteRule /aboutus.html /index.php?gOo=help_copyright.dwt
RewriteRule /feedback.html /index.php?gOo=shopbbs.dwt
RewriteRule /feedback_([0-9]+).html /index.php?gOo=shopbbs.dwt&p=$1
RewriteRule /friendlink.html /index.php?gOo=linkmore.dwt
RewriteRule /register.html /index.php?gOo=register_1.dwt
RewriteRule /lostpass.html /index.php?gOo=forget.dwt
RewriteRule /product/([0-9]+).html /index.php?gOo=goods_details.dwt&goodsid=$1
RewriteRule /product_([0-9]+).html /index.php?gOo=goods_details.dwt&goodsid=$1
RewriteRule /([0-9]+)_([^.]*).html /index.php?gOo=goods_details.dwt&goodsid=$1  
RewriteRule /article_([0-9]+).html /index.php?gOo=help_details.dwt&articleid=$1
RewriteRule /message_([0-9]+).html /index.php?gOo=article_details.dwt&articleid=$1
RewriteRule /catalog_([0-9]+).html /index.php?gOo=goods_search_list.dwt&gcat=$1
RewriteRule /catalog_([0-9]+)_([0-9]+).html /index.php?gOo=goods_search_list.dwt&gcat=$1&p=$2
RewriteRule /addtofavorites_([0-9]+).html /index.php?gOo=addmembergoods.do&goodsid=$1
RewriteRule /list_([a-zA-Z]+).html /index.php?gOo=goods_search_list.dwt&gtype=$1
RewriteRule /list_([a-zA-Z]+)_([0-9]+).html /index.php?gOo=goods_search_list.dwt&gtype=$1&p=$2
"Ecshop" 规则:
code:
RewriteEngine on
RewriteBase
#Ecshop
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 ^(.*)/category-([0-9]+)-b([0-9]+)\.html(.*)$ $1/category\.php\?$4&id=$2&brand=$3
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\?$4&id=$2&cat=$3 [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]
RewriteRule ^(.*)/auction-([0-9]+)\.html$ $1/auction\.php\?act=view&id=$2 [I]
RewriteRule ^(.*)/exchange-id([0-9]+)(.*)\.html$ $1/exchange\.php\?id=$2&act=view [I]
RewriteRule ^(.*)/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2&integral_min=$3&integral_max=$4&page=$5&sort=$6&order=$7 [I]
RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2&page=$3&sort=$4&order=$5 [I]
RewriteRule ^(.*)/exchange-([0-9]+)-([0-9]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2&page=$3 [I]
RewriteRule ^(.*)/exchange-([0-9]+)(.*)\.html$ $1/exchange\.php\?cat_id=$2 [I]
"UCHome" 规则:
code:
RewriteEngine on
RewriteBase
#Uchome
RewriteRule ^(space|network)-(.+)\.html$ $1\.php\?rewrite=$2 [L]
RewriteRule ^(space|network)\.html$ $1\.php [L]
RewriteRule ^([0-9]+)$ space\.php\?uid=$1 [L]
"WordPress" 规则:
code:
RewriteEngine on
RewriteBase
#WordPress
# 形式:年/月/日/Postname/
# 自定义链接 /%year%/%monthnum%/%day%/%postname%/
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /(about_me|blog_log|contact|download|about-copyright|links|favor|archives|tags|sitemap)/ /index\.php\?pagename=$1
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /category/?(.*)/ /index\.php\?category_name=$1
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /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/?$ /wp-trackback\.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1

# 形式:/post/PostID.html
# 自定义链接 /post/%post_id%.html
RewriteRule /post/tag/(.*) /index\.php\?tag=$1
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /(about|contact|about-copyright|favor|archives|tags|sitemap|taotao) /index\.php\?pagename=$1
RewriteRule /post/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /post/category/?(.*) /index\.php\?category_name=$1
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&feed=$2
RewriteRule /author/?(.*) /index\.php\?author_name=$1
RewriteRule /rss.xml /wp-feed\.php/\?feed=rss2
RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
# RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
# RewriteRule /post/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
RewriteRule /post/([0-9]+).html /index\.php\?p=$1
RewriteRule /page/(.*)/?s=(.*) /index\.php\?s=$2&paged=$1
RewriteRule /page/(.*) /index\.php\?paged=$1
RewriteRule /post/date/([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 /post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /post/([0-9]+).html/(feed|rdf|rss|rss2|atom) /index\.php\?feed=rss2&p=$1
RewriteRule /post/([0-9]+).html/trackback /wp-trackback\.php\?p=$1
Emlog 伪静态规则:
code:
RewriteEngine on
RewriteBase
#Emlog
RewriteRule ^(.*)/(post|record|sort|author|page)/([0-9]+)$ $1/index.php\?$2=$3 [L]
RewriteRule ^(.*)/tag/(.+)$ $1/index.php\?tag=$2 [L]
RewriteRule ^(.*)/(post|record|sort|author|page)-([0-9]+)\.html$ $1/index.php\?$2=$3 [L]
RewriteRule ^(.*)/tag-(.+)\.html$ $1/index.php\?tag=$2 [L]
RewriteRule ^(.*)/sort/([0-9]+)/page/([0-9]+)$ $1/index.php\?sort=$2&page=$3 [L]
301重定向 (无www. 301到www.):
以abc.com为例
code:
RewriteEngine on
RewriteBase
#301 Redirecting
RewriteCond %{HTTP:Host} ^abc\.com$ [NC]
RewriteRule (.+) http://www.abc.com$1 [R=301,L]
301重定向 (不同域名转向):
code:
RewriteEngine on
RewriteBase
#301 Redirecting
RewriteRule (.+) http://newserver.com$1 [R=301,L]
另一例子:(www.abc.com是旧域名,www.ab.com是新域名,要把旧域名指向的所有链接自动转向到新域名,防止搜索引擎过来的链接都打不开)
code:
RewriteEngine on
RewriteBase
#301 Redirecting. abc.com => ab.com
RewriteCond %{HTTP:Host} ^(?:www\.)?abc\.com$
RewriteRule (.+) http\:\/\/www.ab.com$1 [R=301,L]
防盗链规则:
code:
RewriteEngine on
RewriteBase
#linkgate
RewriteCond %{HTTP:Host} ^(?www.)?jiexin\.cn$
RewriteCond %{HTTP:Referer} ^(?!http://\1).+
RewriteCond %{HTTP:Referer} ^(?!http://(?:.*\.)?taobao\.com).+
RewriteRule .*\.(?:gif|jpg|png) /linkgate.gif [NC]