MacCMS v10 全站伪静态规则教程

  MacCMS网站为了加强收录优化SEO,做静态的链接是最理想的。伪静态有利于搜索引擎优化,更好的获得排名。

  一、宝塔后台设置伪静态规则

  填充宝塔伪静态规则:宝塔面板–网站–设置–伪静态–粘贴规则代码–保存

  伪静态规则:

if (!-e $request_filename) {
        rewrite ^/index.php(.*)$ /index.php?s=$1 last;
        rewrite ^/api.php(.*)$ /api.php?s=$1 last;
        rewrite ^/admin.php(.*)$ /admin.php?s=$1 last;
        rewrite ^(.*)$ /index.php?s=$1 last;
        break;
        }

二、MacCMS后台设置路由伪静态规则以及开启伪静态

  1.设置苹果后台路由伪静态:苹果后台–系统–URL地址配置–路由伪静态设置–路由规则–粘贴规则代码–保存

  路由伪静态规则:

map   => map/index
rss   => rss/index
 
index-<page?>   => index/index
 
gbook-<page?>   => gbook/index
gbook$   => gbook/index
 
topic-<page?>   => topic/index
topic$  => topic/index
topicdetail-<id>   => topic/detail
 
actor-<page?>   => actor/index
actor$ => actor/index
actordetail-<id>   => actor/detail
actorshow/<area?>-<blood?>-<by?>-<letter?>-<level?>-<order?>-<page?>-<sex?>-<starsign?>   => actor/show
 
role-<page?>   => role/index
role$ => role/index
roledetail-<id>   => role/detail
roleshow/<by?>-<letter?>-<level?>-<order?>-<page?>-<rid?>   => role/show
 
 
vodtype/<id>-<page?>   => vod/type
vodtype/<id>   => vod/type
voddetail/<id>   => vod/detail
vodrss-<id>   => vod/rss
vodplay/<id>-<sid>-<nid>   => vod/play
voddown/<id>-<sid>-<nid>   => vod/down
vodshow/<id>-<area?>-<by?>-<class?>-<lang?>-<letter?>-<level?>-<order?>-<page?>-<state?>-<tag?>-<year?>   => vod/show
vodsearch/<wd?>-<actor?>-<area?>-<by?>-<class?>-<director?>-<lang?>-<letter?>-<level?>-<order?>-<page?>-<state?>-<tag?>-<year?>   => vod/search
 
 
arttype/<id>-<page?>   => art/type
arttype/<id>   => art/type
artshow-<id>   => art/show
artdetail-<id>-<page?>   => art/detail
artdetail-<id>   => art/detail
artrss-<id>-<page>   => art/rss
artshow/<id>-<by?>-<class?>-<level?>-<letter?>-<order?>-<page?>-<tag?>   => art/show
artsearch/<wd?>-<by?>-<class?>-<level?>-<letter?>-<order?>-<page?>-<tag?>   => art/search
 
label-<file> => label/index

  2.设置好路由伪静态规则后,便要开启伪静态:

  路由状态–开启;

  伪静态状态–开启。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

− 1 = 2