首页  >  文章  >  php教程  >  PHPwind 9升级后 nginx apache iis 伪静态配置

PHPwind 9升级后 nginx apache iis 伪静态配置

WBOY
WBOY原创
2016-06-21 08:50:371297浏览

 

PHPwind 9 正式版是一个非常不错的论坛系统,这里就不多宣传了。主要问题是很多之前的用户升级来发现变化很多,之前的伪静态也不能使用了,这里交给大家一个快速设计PW9的伪静态和PHPwind 8.7升级来后,如何使用继续使用以前的伪静态的方法。

官方只提供了新版的伪静态的设计方法,如图: 搜索伪静态,按照要求开启即可,

Apache Web Server 配置

在www目录下自带了.htaccess文件,开启了rewrite后可直接使用,更改了格式后也无需更改这个文件内容。

IIS配置

iis下建议使用isapi_rewrite 第三版,老版本的rewrite不支持RewriteCond语法。 下载地址 http://www.helicontech.com/download-isapi_rewrite3.htm

	RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule !\.(jsicogifjpe?gbmppngcss)$ index.php [L] 
管理工具-> internet信息服务-> 网站 点右键. -> 属性 ISAPI筛选器 看到下面那个ISAPI_Rewrite3了吧。 转到 rewrite的选项卡 可以看到里面的rewrite规则

Nginx配置

location / { 
    if (-f $request_filename) {
           break;
    }
    if ($request_filename ~* "\.(jsicogifjpe?gbmppngcss)$") {
        break;
    }
    if (!-e $request_filename) {
        rewrite . /index.php last;
    }
} 

PHPwind 8.7用户升级之后如何使用,请看下面:

我们这是建立在nginx基础上的配置方法,apache的对照规则修改即可

#没有开启伪静态,升级pw9后跳转地址 如果不想跳转把 permanent 换成 last 
 #rewrite ^/thread-htm-fid-(.+).html$ index.php?m=bbs&c=thread&fid=$1 permanent;
 #rewrite ^/read-htm-tid-(.+).html$ read.php?tid=$1 permanent;

 #开启伪静态,升级pw9后跳转地址 如果不想跳转把 permanent 换成 last 
 rewrite ^/thread-htm-fid-(.+).html$ /thread-$1/ permanent;
 rewrite ^/read-htm-tid-(.+).html$ /read-$1/ permanent;
 



声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn