阅读:1386回复:1

设置伪静态,点击,资讯, 显示404 Not Found!

楼主#
更多 发布于:2020-12-01 18:37
设置的伪静态,不知道是不是没设置对?配置如下:



location / {
           rewrite ^/frim/index(.+?)\.html$ /list/index.php?$1 last;
           rewrite ^/movie/index(.+?)\.html$ /detail/index.php?$1 last;
           rewrite ^/play/([0-9]+)-([0-9]+)-([0-9]+)\.html$ /video/index.php?$1-$2-$3 last;
           rewrite ^/topic/index(.+?)\.html$ /topic/index.php?$1 last;
           rewrite ^/topic/index\.html$ /topic/index.php?$1 last;
           rewrite ^/topiclist/(.+?).html$ /topiclist/index.php?$1 last;
           rewrite ^/index\.html$ index.php permanent;
           rewrite ^/news/index\.html$ /news/index.php?$1 last;
           rewrite ^/html/part/index(.+?)\.html$ /articlelist/index.php?$1 last;
           rewrite ^/html/article/index(.+?)\.html$ /article/index.php?$1 last;
       }


但是我自己写了文章发布(手动写用火车头采集),发现文章是可以查看的,就是下面这个规则是可以的,
rewrite ^/html/part/index(.+?)\.html$ /articlelist/index.php?$1 last;


就只有资讯首页是Not Found.
1楼#
发布于:2020-12-01 18:50
设置的伪静态,不知道是不是没设置对?配置如下:
location / {
            rewrite ^/frim/index(.+?)\.html$ /list/index.php?$1 last;
            rewrite ^/movie/index(.+?)\.html$ /detail/index.php?$1 last;
            rewrite ^/play/([0-9]+)-([0-9]+)-([0-9]+)\.html$ /video/index.php?$1-$2-$3 last;
            rewrite ^/topic/index(.+?)\.html$ /topic/index.php?$1 last;
            rewrite ^/topic/index\.html$ /topic/index.php?$1 last;
            rewrite ^/topiclist/(.+?).html$ /topiclist/index.php?$1 last;
            rewrite ^/index\.html$ index.php permanent;
            rewrite ^/news/index\.html$ /news/index.php?$1 last;
            rewrite ^/html/part/index(.+?)\.html$ /articlelist/index.php?$1 last;
            rewrite ^/html/article/index(.+?)\.html$ /article/index.php?$1 last;
        }
但是我自己写了文章发布(手动写不用火车头采集),发现文章是可以查看的,就是下面这两条规则都是是可以的,
rewrite ^/html/part/index(.+?)\.html$ /articlelist/index.php?$1 last;
rewrite ^/html/article/index(.+?)\.html$ /article/index.php?$1 last;
但是,下面这条规则好像没起作用
rewrite ^/news/index\.html$ /news/index.php?$1 last;
就只有资讯首页是Not Found.
游客

返回顶部