默认安装的是动态模式,如果想启用伪静态模式的话,步骤如下:
(Apache下)
1.先要检查一下根目录是否存在.htaccess文件 ,如果不存在 ,请到安装包上找一下。
2.用管理员登录进入后台,基本设置中,有一个开启/关闭 开关。开启就可以了。
htaccess文件 代码这里贴一下。
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
如果系统安装在二级目录下,请修改最后一条规则
RewriteRule ^(.*)$ /bbs/index.php/$1 [L]
其中bbs为你的二级安装目录。
如果你的空间不支持伪静态,但你在后台开启了伪静态的话,需要手动改一下myconfig文件
app/config/myconfig.php中
'index_page' => '',
改为
'index_page' => 'index.php',
在 iis 下的 rewrite 设置
[ISAPI_Rewrite]
RewriteRule /(?:index.php|robots.txt|static|uploads)/(.*) $0 [I,L]
RewriteRule /(?:index.php|robots.txt) $0 [I,L]
RewriteRule /(.*) /index.php/$1 [L]
把 这些内容复制到 http.ini下

咨询热线:








建站咨询

