15053971836 注册 / 登录

php伪静态后不能访问html

时间: 阅读:265
php伪静态后不能访问html

最佳回答

清风若雨

清风若雨

2023-01-15 19:09:33

首先要确定你的web服务器用的什么,是iis,apache,还是nginx。从你放在宝塔上的内容来看,你是用的iis,因为你使用的是xml文件内容,但是xml文件不能在这个伪静态控制里面写入。使用的方式是不对的,也就是说你的伪静态文件没有生效,所以打不开。

最新回答共有2条回答

  • 游客
    回复
    2023-01-15 21:21:35

    只要支持伪静态的,而且从来没出现过不能访问的情况,除非下面的代码写错了,我是这样子做的
    RewriteRule taoou/product-([0-9]+).html$ taoou/product.php?bid=$1
    RewriteRule taoou/product-([w]+)-([0-9a-z]+).html$ taoou/product.php?bname=$1&bid=$2
    RewriteRule taoou/product-([w]+)-([0-9a-z]+)-([0-9]+).html$ taoou/product.php?bname=$1&bid=$2&page=$3
    RewriteRule taoou/product2.html$ taoou/product2.php
    RewriteRule taoou/product2-([0-9]+).html$ taoou/product2.php?bid=$1
    RewriteRule taoou/product2-([w]+)-([0-9a-z]+).html$ taoou/product2.php?bname=$1&bid=$2
    RewriteRule taoou/product2-([w]+)-([0-9a-z]+)-([0-9]+).html$ taoou/product2.php?bname=$1&bid=$2&page=$3
    RewriteRule taoou/search.html$ taoou/search.php
    RewriteRule taoou/search-([w]+).html$ taoou/search.php?keyword=$1
    RewriteRule taoou/search-([w]+)-([0-9]+).html$ taoou/search.php?keyword=$1&page=$2