网站首页技术博客
Nginx及windows iis下thinkphp的伪静态配置
摘要centos装在的是lnmp1.3集成安装包
1、在站点引入的配置文件中(默认为other.conf )添加如下配置
location / {
root /var/www;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
2、重新启动Nginx服务器即可
centos装在的是lnmp1.3集成安装包
1、在站点引入的配置文件中(默认为other.conf )添加如下配置
location / { index index.html index.htm index.php; if (!-e $request_filename) { rewrite ^/index.php(.*)$ /index.php?s=$1 last; rewrite ^(.*)$ /index.php?s=$1 last; break; } }
2、重新启动Nginx服务器即可
另外附上windows iis上的伪静态配置文件
希望能够帮助需要的小伙伴