分类分类
更新时间:2026-02-18 19:49:09作者:sa
shopnc b2b2c伪静态功能很简单,但是官方伪静态中设置的只有伪静态商城和cms中的文章信息,但里面一些栏目跟圈子那边都没有使用到伪伪静态的写法.
在shopnc中开启伪静态很简单,在/data/config/config.ini.php
在里面开启
$config['url_model'] = true; //伪静态开启
这样子就开启了,但cms和圈子中要使用伪静态功能还要改不少代码,下面我就分享一个cms中在apache中伪静态的规则给大家:
<IfModule mod_rewrite.c>
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]
</IfModule>
以上是规则,但写规则了,还要在代理中写入对应的实现方法,下次有空再把代码发上来!
相关
归墟战纪策略游戏262.92 MBv3.95802026-02-14
下载爆裂老奶策略游戏209.43 MBv1.0.112026-02-14
下载超能下蛋鸭策略游戏395.4 MBv1.2.82026-02-14
下载你好盒子实用工具12.1 MBv2.2.852026-02-14
下载我在峡谷当牛马休闲益智87.95 MBv0.7.12026-02-14
下载抽卡监狱2策略游戏190.75 MBv1.4.92026-02-14
下载Campus社交通讯94.36 MBv1.19.02026-02-14
下载冒险传奇角色扮演141.73 Mv9991.12026-02-14
下载心动次元app社交通讯43.96 Mv1.0.1.32026-02-14
下载致亲爱的我角色扮演1.63Gv1.02026-02-14
下载狼伴侣游戏手机版冒险游戏155.6 Mv1.02026-02-14
下载Loclike社交通讯169.08 Mv2.2.112026-02-14
下载










