SupSite/X-Space 启用Rewrite说明
来源:互联网 发布:开淘宝具备什么条件 编辑:程序博客网 时间:2024/06/14 18:48
SupSite/X-Space 启用Rewrite说明
------------------------------
http://www.supesite.com
===============================================
+ Apache Web Server(虚拟主机用户)
===============================================
在开始以下设置之前,请首先咨询您的空间服务商
空间是否支持 Rewrite 以及是否支持对站点目录中.htaccess 的文件解析
否则即便按照下面的方法设置好了,也无法使用
注意:
以下规则,仅适用于程序可以通过独立域名或者二级域名直接访问。
如果您的程序需要域名后面加目录名的方式才可以访问,那么,您需要手工修改以下规则:
将 “RewriteBase/”
其中,“xxx”为您的程序目录名
-----------------------------------------------------------------------
### 将 RewriteEngine 模式打开
RewriteEngine On
### 修改以下语句中的 /supesite修改为你的SupeSite目录地址,如果程序放在根目录中,请将/supesite 修改为 /
RewriteBase /
### Rewrite 系统规则请勿修改
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 ^([0-9]+)$ index.php?uid/$1 [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]
-----------------------------------------------------------------------
添加内容时,请遵照上面的提示,修改程序所在的路径
然后保存为文件 .htaccess 。将 .htaccess文件上传到SupeSite所在的目录中
进入SupeSite 系统设置,根据需要开启 URL 静态化功能
===============================================
+ Apache Web Server(独立主机用户)
===============================================
首先确定您使用的 Apache 版本,及是否加载了mod_rewrite 模块。
Apache 1.x 的用户请检查 conf/httpd.conf中是否存在如下两段代码:
LoadModulerewrite_module
AddModule mod_rewrite.c
Apache 2.x 的用户请检查 conf/httpd.conf中是否存在如下一段代码:
LoadModulerewrite_module
如果存在,那么在配置文件(通常就是conf/httpd.conf)中加入如下代码
此时请务必注意,如果网站使用通过虚拟主机来定义
请务必加到虚拟主机配置,即中去,如果加在虚拟主机配置外部将可能无法使用
改好后然后将 Apache 重启。
注意:
以下规则,仅适用于程序可以通过独立域名或者二级域名直接访问。
如果您的程序需要域名后面加目录名的方式才可以访问,那么,您需要手工修改以下规则:
将“^/”
将“/index.php”
其中,xxx 为您的程序目录名
-----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
### Rewrite 系统规则请勿修改
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 ^/([0-9]+)$ /index.php?uid/$1 [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]
</IfModule>
-----------------------------------------------------------------------
如果没有安装 mod_rewrite,您可以重新编译 Apache
并在原有 configure 的内容中加入--enable-rewrite=shared
然后再在 Apache配置文件中加入上述代码即可。
进入SupeSite 系统设置,根据需要开启 URL 静态化功能
===============================================
+ IIS服务器(Windows主机用户)
===============================================
首先,需要安装模块
安装方法是:将iisrewrite.zip中的文件解压到服务器的一个目录中。
iisrewrite.zip 下载地址:
http://www.supesite.com/tools/iisrewrite.zip
打开IIS管理器 -> 选择网站属性-> ISAPI筛选器 ->在名称中输入rewrite ->
可执行文件选择刚才解压后的文件Rewrite.dll-> 点确定
-> 再点确定 ->关闭属性对话框
再次查看网站属性 -> 到ISAPI筛选器
如果看到状态为向上的绿色箭头,就说明Rewrite模块安装成功了
然后,修改Rewrite规则
到刚才解压的目录下,找到httpd.ini文件
httpd.ini的规则,仅适用于程序可以通过独立域名或者二级域名直接访问。
如果您的程序需要域名后面加目录名的方式才可以访问,那么,您需要手工修改httpd.ini的规则:
将“^/”
将“/index\.php”
其中,xxx 为您的程序目录名
一旦修改了Rewrite规则,请重启网站,使规则生效
===============================================
+ Zeus服务器(针对ZeusV4.X,且仅针对独立主机)
===============================================
注意:
以下规则,仅适用于程序可以通过独立域名或者二级域名直接访问。
如果您的程序需要域名后面加目录名的方式才可以访问,那么,您需要手工修改以下规则:
将“^/”
将“/index.php”
其中,xxx 为您的程序目录名
-----------------------------------------------------------------------
RULE_0_START:
match URL into $ with ^/([0-9]+)/spacelist(.+)$
if not matched then goto RULE_0_END
# Source line 1
# Second half of: RewriteRule ^/([0-9]+)/spacelist(.+)$/index.php?uid/$1/action/spacelist/type$2 [L]
set URL = /index.php?uid/$1/action/spacelist/type$2
# This rule has [L]
goto END
RULE_0_END:
RULE_1_START:
match URL into $ with ^/([0-9]+)/viewspace(.+)$
if not matched then goto RULE_1_END
# Source line 2
# Second half of: RewriteRule ^/([0-9]+)/viewspace(.+)$/index.php?uid/$1/action/viewspace/itemid$2 [L]
set URL = /index.php?uid/$1/action/viewspace/itemid$2
# This rule has [L]
goto END
RULE_1_END:
RULE_2_START:
match URL into $ with ^/([0-9]+)/viewbbs(.+)$
if not matched then goto RULE_2_END
# Source line 3
# Second half of: RewriteRule ^/([0-9]+)/viewbbs(.+)$/index.php?uid/$1/action/viewbbs/tid$2 [L]
set URL = /index.php?uid/$1/action/viewbbs/tid$2
# This rule has [L]
goto END
RULE_2_END:
RULE_3_START:
match URL into $ with ^/([0-9]+)/(.*)$
if not matched then goto RULE_3_END
# Source line 4
# Second half of: RewriteRule ^/([0-9]+)/(.*)$ /index.php?uid/$1/$2[L]
set URL = /index.php?uid/$1/$2
# This rule has [L]
goto END
RULE_3_END:
RULE_4_START:
match URL into $ with ^/([0-9]+)$
if not matched then goto RULE_4_END
# Source line 5
# Second half of: RewriteRule ^/([0-9]+)$ /index.php?uid/$1[L]
set URL = /index.php?uid/$1
# This rule has [L]
goto END
RULE_4_END:
RULE_5_START:
match URL into $ with ^/action(.+)$
if not matched then goto RULE_5_END
# Source line 7
# Second half of: RewriteRule ^/action(.+)$ /index.php?action$1[L]
set URL = /index.php?action$1
# This rule has [L]
goto END
RULE_5_END:
RULE_6_START:
match URL into $ with ^/category(.+)$
if not matched then goto RULE_6_END
# Source line 8
# Second half of: RewriteRule ^/category(.+)$/index.php?action/category/catid$1 [L]
set URL = /index.php?action/category/catid$1
# This rule has [L]
goto END
RULE_6_END:
RULE_7_START:
match URL into $ with ^/viewnews(.+)$
if not matched then goto RULE_7_END
# Source line 9
# Second half of: RewriteRule ^/viewnews(.+)$/index.php?action/viewnews/itemid$1 [L]
set URL = /index.php?action/viewnews/itemid$1
# This rule has [L]
goto END
RULE_7_END:
RULE_8_START:
match URL into $ with ^/viewthread(.+)$
if not matched then goto RULE_8_END
# Source line 10
# Second half of: RewriteRule ^/viewthread(.+)$/index.php?action/viewthread/tid$1 [L]
set URL = /index.php?action/viewthread/tid$1
# This rule has [L]
goto END
RULE_8_END:
RULE_9_START:
match URL into $ with ^/mygroup(.+)$
if not matched then goto RULE_9_END
# Source line 11
# Second half of: RewriteRule ^/mygroup(.+)$/index.php?action/mygroup/gid$1 [L]
set URL = /index.php?action/mygroup/gid$1
# This rule has [L]
goto END
RULE_9_END:
-----------------------------------------------------------------------
体验新版博客
- SupSite/X-Space 启用Rewrite说明
- SupSite/X-Space 启用Rewrite说明
- UCenter Home启用Rewrite服务器配…
- Space X 启用阿波罗登月时代的发射台,并实现第三次陆上回收猎鹰 9 号
- rewrite 解说说明
- nginx 配置说明 rewrite
- nginx配置ThinkPHP Rewrite
- Debian下为Apache启用rewrite模块
- Windows主机:Apache启用rewrite和.htaccess
- 启用Rewrite让齐博CMS实现伪静态
- debian下为apache启用rewrite模块
- Scale Space
- Java heap space 解决方法
- Apache Rewrite 常用设置说明
- .htaccess rewrite 规则详细说明
- .htaccess rewrite 规则详细说明
- .htaccess rewrite 规则详细说明
- linux apache 服务器开启rewrite …
- 新手学堂:网络远程唤醒技术实现方…
- (3)Android开源项目
- Ajax 和 XML: 五种常见 Ajax 模式
- 【Java工程师之路】[2-1.6]ORACLE函数大全
- Linux操作系统安全配置步骤详细说…
- SupSite/X-Space 启用Rewrite说明
- SESSION变量的生存周期
- Java FckEditor 2.6+JSP的配置方法详解
- Apache2的httpd.conf翻译
- centOS下配置php开发环境的一些常用路径
- PHP程序常见漏洞攻击宝典
- 使用apache模块rewrite_module
- html实体与网页编码
- php中的json