海洋cms nginx伪静态规则

发布时间: 访问量:169

为了增加搜索引擎友好度,网站采用URL伪静态是非常有效一种手段,下面是海洋cms的伪静态规则,需要的朋友快学起来吧!

Nginx伪静态规则如下,路径名称请对照修改:

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;
}

另外使用IIS和Apache的伪静态规则,海洋cms后台可以直接自动生成,不用单独设置。

更多文章