我司虚拟主机服务器为windows服务器,对静态化的配置表现为在根目录下放置httpd.ini(URL Rewrite配置文件).
备注: .htaccess方式为Unix/Linux服务器所使用的URL Rewrite配置方式.
注:伪静态注释有中文的,保存编码格式要:ANSI
以下是常见的通用网站程序的 UrlRewrit 规则,如果您自己写的网站程序,请让贵公司的程序员根据自己的程序自行
编写 UrlWrite 规则,Urlwrite规则是用正则表达式编写的,在编写时,请注意对正则表达式的特殊字符进行转义,比
如要将"?"写成"\?"等。如果贵公司的程序员不清楚什么是正则表达式,请先通过百度搜索并了解什么是正则表达式再编写。
1.Discuz.
1).上传httpd.ini文件到虚拟主机根目录.
httpd.ini文件内容:
[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
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 ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php\?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php\?name=$2
RewriteRule ^(.*)/index-(.+)\.html$ $1/index.php\?gid=$2
#RewriteRule ^(.*)/index\.html$ $1/index.php
RewriteRule ^(这里填写您的BBS的安装目录,不要带“/”)/index\.html$ $1/index.php
来源:http://www.72e.net/support/doc-1350.aspx?cid=jm