首页建站经验 shopnc b2b2c伪静态开启与写法

shopnc b2b2c伪静态开启与写法

shopnc b2b2c伪静态功能很简单,但是官方伪静态中设置的只有伪静态商城和cms中的文章信息,但里面一些栏目跟圈子那边都没有使用到伪伪静态的写法.在shopnc中开启伪静态很简单…

shopnc b2b2c伪静态功能很简单,但是官方伪静态中设置的只有伪静态商城和cms中的文章信息,但里面一些栏目跟圈子那边都没有使用到伪伪静态的写法.

在shopnc中开启伪静态很简单,在/data/config/config.ini.php
在里面开启

$config['url_model'] = true; //伪静态开启

这样子就开启了,但cms和圈子中要使用伪静态功能还要改不少代码,下面我就分享一个cms中在apache中伪静态的规则给大家:

RewriteEngine on

#文章

RewriteRule ^article.html$ index.php?act=article&op=article_list

RewriteRule ^article_list_([0-9]+).html$ index.php?act=article&op=article_list&class_id=$1

RewriteRule ^article_tag_([0-9]+).html$ index.php?act=article&op=article_tag_search&tag_id=$1

RewriteRule ^article_key_((.*?)+).html$ index.php?act=article&op=article_search&keyword=$1

#画报

RewriteRule ^picture.html$ index.php?act=picture&op=picture_list

RewriteRule ^picture_list_([0-9]+).html$ index.php?act=picture&op=picture_list&class_id=$1

RewriteRule ^picture_tag_([0-9]+).html$ index.php?act=picture&op=picture_tag_search&tag_id=$1

RewriteRule ^picture_key_((.*?)+).html$ index.php?act=picture&op=picture_search&keyword=$1

#专题

RewriteRule ^special.html$ index.php?act=special&op=special_list

RewriteRule ^special-([0-9]+).html$ index.php?act=special&op=special_detail&special_id=$1

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

#过滤服务器启用了TRACE Method

RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]

# mod_fcgid & php-cgi

RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

# php5apache2_2.dll

#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

以上是规则,但写规则了,还要在代理中写入对应的实现方法,下次有空再把代码发上来!

 

本文来自网络,不代表1号站长-站长学院|资讯交流平台立场。转载请注明出处: https://www.1cn.cc/jianzhan/jingyan/16839.html
上一篇ecshop 调用广告函数代码
下一篇 shopnc目录结构
admin

作者: admin

这里可以再内容模板定义一些文字和说明,也可以调用对应作者的简介!或者做一些网站的描述之类的文字或者HTML!

为您推荐

评论列表()

    联系我们

    联系我们

    0898-88888888

    在线咨询: QQ交谈

    邮箱: email@wangzhan.com

    工作时间:周一至周五,9:00-17:30,节假日休息

    关注微信
    微信扫一扫关注我们

    微信扫一扫关注我们

    关注微博
    返回顶部