最新公告
  • 欢迎您光临站长源码网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入钻石VIP
  • 帝国CMS7.5自定义伪静态插件{SEO栏目优化利器}[支持7.0,7.2]

    正文概述 管理员   2024-09-02   47

    帝国CMS自定义伪静态插件{SEO栏目优化利器}[支持7.0,7.2]

    1526179067.zip
    9360197eb5022235d774c946e131affe.zip(9.60 KB)

    本文关键字词:自定义伪静态,栏目目录伪静态,内容目录伪静态,帝国cms伪静态,SEO栏目优化

    实现栏目目录伪静态,比如news/china/69_1.html 是伪静态实现的,而不是生成静态的。纯绿色不影响帝国原有伪静态、静态和动态等功能设置。

    1:栏目要选静态 不生成
    2:内容页存放目录–栏目目录,内容页目录存放形式–不设置目录,(有利SEO,方便匹配栏目ID)
    3:内容页文件命名形式 不能是目录,但是支持信息文件名的修改,URL也能很好看
    4:栏目目录和信息文件名是英文或数字(栏目目录建议英文或英文开头,“-_”上下划线留着给别的东西用吧避免冲突如其它伪静态,避免冲突)
    ********为了通用只能遵守上述要求,有这些特殊需求自己改去*********

    在列表页使用分页号(后缀为.html的)
    <?= (int)substr($_GET['page'], 6) && (int)substr($_GET['page'], 6) != 1 ? '第 [!--list.pageno--] 页' : ''?>
    

    在内容页使用分页标题:

    <?= (int)str_replace('_', '', $_GET['page']) && (int)str_replace('_', '', $_GET['page']) != 1 ? '[!--p.title--]' : '[!--pagetitle--]'?>
    

    栏目设置截图演示:

    伪静态规则

    #栏目
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
    RewriteRule ^([0-9a-zA-Z/]+)/(|index\.html|index_[0-9]+\.html)$ /e/action/list\.php\?classid=$1&page=$2
    #内容
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
    RewriteRule ^([0-9a-zA-Z/]+)/([0-9a-zA-Z]+)([_0-9]*)\.html$ /e/action/show\.php\?classid=$1&id=$2&page=$3
    

    NGNIX:

    location ~* /e/admin/|/sys-static/{
        break;
    }
    	location ~* {
    	rewrite ^/showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3 last;
    	rewrite ^/listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid=$1&page=$2 last;
    	rewrite ^/infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid=$1&page=$2 last;
    rewrite ^/tags-(.+?)-([0-9]+).html$ /e/tags/index.php?tagname=$1&page=$2 last;
    	rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/pl/index.php?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6 last;
    	rewrite ^/([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid=$1&page=$2 last;
    	rewrite ^/([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid=$1&id=$2&page=$3 last;
    
    }
    


    站长源码网 » 帝国CMS7.5自定义伪静态插件{SEO栏目优化利器}[支持7.0,7.2]

    发表评论

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者

    请选择支付方式

    ×
    支付宝支付
    微信支付
    余额支付
    ×
    微信扫码支付 0 元