本帖最后由 530761333 于 2013-7-18 23:41 编辑
我看到有几个用户在问仿静态问题首先要问你们服务商支持不或让他帮你调和安装必要的组件他们不管就要自己想办法了
假如支持的话自己编写一个“.htaccess”规测就好了
我就说说发部分虚拟主机不支持的解决方法
大多数服务器不支持DZ解决方法如下:
打开 ./include/global.func.php, 查找:- <li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">function rewrite_thread($tid, $page = 0, $prevpage = 0, $extra = '') {
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">return '';
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">}
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">function rewrite_forum($fid, $page = 0, $extra = '') {
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">return '';
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">}
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">function rewrite_profile($uid, $username, $extra = '') {
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">return '';
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">}</li>
复制代码
替换为:- <li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">function rewrite_thread($tid, $page = 0, $prevpage = 0, $extra = '') {
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">global $boardurl;
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">return '';
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">}
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">function rewrite_forum($fid, $page = 0, $extra = '') {
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">global $boardurl;
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">return '';
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">}
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">function rewrite_profile($uid, $username, $extra = '') {
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">global $boardurl;
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">return '';
- </li><li style="padding-left: 10px; list-style-type: decimal-leading-zero; line-height: 1.8em;">}</li>
复制代码
用 FTP 软件登录你的主页空间, 把 ./index.php 文件重名名为: bbs.php
复制代码下载附件并解压缩, 把我编写好的 index.php 上传至论坛根目录.
打开 系统设置, 依次打开 Discuz! 选项 - 论坛功能, 找到 URL 静态化 一项, 选择 普通页面静态化, 即第 3 个选项.
安装完成.
|