无标题文档
wdCP系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdCDN系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
wdOS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdDNS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
注册 发贴 提问 回复-必看必看 wddns免费智能 DNS 开通 本地或虚拟机使 用wdcp 一键包在mysql编 译时"卡住"
AI导航网AI应用网站大全 wdcp官方技术支持/服务 阿里云8折优惠券 无敌云 腾讯云优惠中,现注册更有260代金额券赠送
返回列表 发帖
提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等

温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的

[求助] 设置nginx的伪静态规则后,在网站开启伪静态无效,求解!

location / {
rewrite /index\.html$ /index.php last;
rewrite /sitemap\.html$ /sitemap.php last;
rewrite /malllist\.html$ /malllist.php last;
rewrite /shoplist\.html$ /shoplist.php last;
rewrite /article\.html$ /article.php last;
rewrite /user/center\.html$ /user/center.php last;
rewrite /mall-(.*)-(.*)-(.*)\.html$ /mall.php?id=$1&act=$2&page=$3 last;
rewrite /mall-(.*)-(.*)\.html$ /mall.php?id=$1&act=$2 last;
rewrite /mall-(.*)\.html$ /mall.php?id=$1 last;
rewrite /view-(.*)-(.*)\.html$ /view.php?iid=$1&page=$2 last;
rewrite /view-(.*)\.html$ /view.php?iid=$1 last;
rewrite /malllist-(.*)-(.*)-(.*)\.html$ /malllist.php?catid=$1&mall=$2&page=$3 last;
rewrite /article_list-(.*)-(.*)\.html$ /article_list.php?cid=$1&page=$2 last;
rewrite /article_list-(.*)\.html$ /article_list.php?cid=$1 last;
rewrite /read-(.*)\.html$ /read.php?id=$1 last;
rewrite /shoplist-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /shoplist.php?cid=$1&keyword=$2&start_level=$3&end_level=$4&area=$5&px=$6&cpr=$7&type=$8&page=$9 last;
rewrite /list-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /list.php?cid=$1&start_price=$2&end_price=$3&sort=$4&area=$5&guarantee=$6&list=$7&q=$8&page=$9 last;
rewrite /shop-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /shop.php?nick=$1&start_price=$2&end_price=$3&sort=$4&area=$5&guarantee=$6&list=$7&q=$8&page=$9 last;
rewrite /shoplist-(.*)\.html$ /shoplist.php?cid=$1 last;
rewrite /shop-(.*)\.html$ /shop.php?nick=$1 last;
rewrite /list-(.*)\.html$ /list.php?cid=$1 last;
rewrite /list\.html$ /list.php last;
rewrite /huangou-(.*)\.html$ /huangou.php?id=$1 last;
rewrite /huan-(.*)-(.*)\.html$ /huan.php?keyword=$1&page=$2 last;
rewrite /huan\.html$ /huan.php last;
rewrite /coupons-(.*)-(.*)\.html$ /coupons.php?cid=$1&page=$2 last;
rewrite /coupons\.html$ /coupons.php last;
rewrite /cuxiao-(.*)\.html$ /cuxiao.php?id=$1 last;
rewrite /tg-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /tg.php?city_id=$1&catid=$2&mallid=$3&keyword=$4&page=$5 last;
rewrite /tg-(.*)-(.*)-(.*)-(.*)\.html$ /tg.php\?city_id=$1&catid=$2&mallid=$3&page=$4 last;
rewrite /tg-(.*)-(.*)-(.*)\.html$ /tg.php?city_id=$1&catid=$2&mallid=$3 last;
rewrite /tg-(.*)\.html$ /tg.php?city_id=$1 last;
rewrite /tg\.html$ /tg.php last;
rewrite /tgview-(.*)\.html$ /tgview.php?id=$1 last;
}

规则没错吧。我在管理面板里添加了,也上传到网站根目录下了,就是访问静态URL无效。PHP正常。

该怎么办呀,刚从KLOXO转到国产的面板来。

我也重启了WEB服务。 也是访问静态URL无效 。PHP正常。

TOP

有没有朋友,也遇到过我这样的问题呀

TOP

先确认规则本身是否能正常使用,可以直接加在虚拟主机配置段里测试
看清提问三步曲及多看教程/FAQ索引(wdcp,v3,一键包,wdOS),益处多多.wdcp工具集 阿里云主机8折优惠码

TOP

返回列表