描述:XiunoBBS 只需要一条规则:将 *.htm 转发到 index.php?*.htm 即可。Xiuno BBS 2.1 需要编辑 conf/conf.php,Xiuno BBS 3.0 不需要 1、2 步骤。1. 编辑 conf/conf.php 中的 urlrewrite => 1,2.…
XiunoBBS 只需要一条规则:
将 *.htm 转发到 index.php?*.htm 即可。
Xiuno BBS 2.1 需要编辑 conf/conf.php,Xiuno BBS 3.0 不需要 1、2 步骤。
1. 编辑 conf/conf.php 中的 urlrewrite => 1,
2. 清空 tmp 目录
3. 修改 Web Server 的 Rewrite 规则,以下为各种Web Server 的样例:
4. 重启 web server
Nginx:
打开 nginx 配置文件 /usr/local/nginx/conf/nginx.conf 找到对应的虚拟主机配置处,追加加粗行:
location / {
rewrite "^(.*)/(.+?).htm$" $1/index.php?$2.htm last;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
}
index index.html index.htm index.php;
root /data/wwwroot/xiuno.com;
}
然后重新启动 nginx: service nginx restart
Apache:
vim /etc/httpd/conf/httpd.conf
<Directory d:/xiuno.com>
Options FollowSymLinks ExecCGI Indexes
AllowOverride all
Order deny,allow
Allow from all
Satisfy all
</Directory>
NameVirtualHost *:80
Apache .htaccess
如果Appache 支持 .htaccess,那么可以编辑 .htaccess 文件放置于根目录下:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^admin/(.*)\.htm$ /admin/index.php?$1.htm [L]
RewriteRule ^mobile/(.*)\.htm$ /mobile/index.php?$1.htm [L]
RewriteRule ^(.*)\.htm$ /index.php?$1.htm [L]
</IfModule>
Apache httpd.conf
如果将规则直接放入 httpd.conf 则需要在前面加 / ,看来 Apache 也反人类:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/admin/(.*)\.htm$ /admin/index.php?$1.htm [L]
RewriteRule ^/mobile/(.*)\.htm$ /mobile/index.php?$1.htm [L]
RewriteRule ^/(.*)\.htm$ /index.php?$1.htm [L]
</IfModule>
SAE环境,根目录建立 config.yaml 文件:
appname: axiuno
version: 1
handle:
- rewrite: if ( !is_dir() && !is_file() && path ~ "admin/(.*.htm)" ) goto "admin/index.php?%1"
- rewrite: if ( !is_dir() && !is_file() && path ~ "mobile/(.*.htm)" ) goto "mobile/index.php?%1"
- rewrite: if ( !is_dir() && !is_file() && path ~ "[^/?].htm" ) goto "index.php?%1"
IIS:
1. 下载 Rewrite.zip
2. 解压到 c:\Rewrite
3. 在IIS的Isapi上添加这个筛选器, 筛选器名称Rewrite,可执行文件选择 Rewrite.dll
4. 重新启动IIS
5. httpd.ini 是配置文件,如果您了解Rewrite 规则,可以直接对其进行编辑,以下为包内设置好的Xiuno BBS的规则:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
#RewriteRule .*\.(?:gif|jpg|png|css|js|txt|jpeg|swf|flv) $0 [I,L]
#RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/mobile(.*)\.htm /mobile/index.php?$1.htm [L]
RewriteRule ^/admin(.*)\.htm /admin/index.php?$1.htm [L]
RewriteRule ^(.*)\.htm /index.php?$1.htm [L]
另外一种 IIS Rewrite:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/mobile/(.*)\.htm /mobile/$1.htm [L]
RewriteRule ^/admin/(.*)\.htm /admin/$1.htm [L]
RewriteRule ^(.*)\.htm$ /$1.htm [L]
pbootcms内核开发的网站模板,该模板适用于微信小程序网站、软件开发网站等企业,当然其他行业也可以做,只需要把文字图片换成其他行业的即可;PC+WAP,同一个后台,数据即时同步,简单适用!附带测试数据!友好的seo,所有页面均都能完全自定义标题/关键词/描述,PHP程序,安全、稳定、快速;用低成…
(PC+WAP)粉色家政服务公司网站模板 月嫂保姆网站源码下载pbootcms内核开发的网站模板,该模板适用于家政服务公司网站、月嫂保姆网站等企业,当然其他行业也可以做,只需要把文字图片换成其他行业的即可;PC+WAP,同一个后台,数据即时同步,简单适用!附带测试数据!友好的seo,所有页…
(PC+WAP)红色火锅加盟网站pbootcms模板 餐饮美食网站源码下载pbootcms内核开发的网站模板,该模板适用于火锅加盟网站、餐饮美食网站等企业,当然其他行业也可以做,只需要把文字图片换成其他行业的即可;PC+WAP,同一个后台,数据即时同步,简单适用!附带测试数据!友好的seo,所有页面…
(PC+WAP)绿色草坪地坪施工pbootcms网站模板 操场人造草坪网站源码下载pbootcms内核开发的网站模板,该模板适用于人造草坪网站、草坪地坪网站等企业,当然其他行业也可以做,只需要把文字图片换成其他行业的即可;PC+WAP,同一个后台,数据即时同步,简单适用!附带测试数据!友好的seo,…
本套织梦模板采用织梦最新内核开发的模板,这款模板使用范围广,不仅仅局限于一类型的企业,政府部门、单位机构类的网站都可以用该模板。你只需要把图片和文章内容换成你的即可,颜色都可以修改,改完让你耳目一新的感觉!布局规整,利于用户体验,手工书写DIV+CSS,代码精简。同一个后台管理 三网合一简…
1.更新下载类目的采集 及 导入网站程序:jizhiCMS + 高仿新版某刀资源网模板采集程序:蓝天采集 + 已对接好资源站规则网站图片及蓝天采集规则安装教程在下面⬇⬇⬇⬇⬇⬇⬇ 链接:https:/…