国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

shopnc b2b2c偽靜態開啟與寫法

2024-04-25 20:34:41
字體:
來源:轉載
供稿:網友

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>

以上是規則,但寫規則了,還要在代理中寫入對應的實現方法,下次有空再把代碼發上來!

 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宁晋县| 宜丰县| 津南区| 垫江县| 东海县| 河南省| 拉孜县| 洪洞县| 大埔区| 洪湖市| 合作市| 栾川县| 梧州市| 龙陵县| 合水县| 涞水县| 凤凰县| 南靖县| 凉山| 县级市| 碌曲县| 平南县| 峨边| 正镶白旗| 新乡市| 隆德县| 白城市| 双牌县| 安顺市| 勃利县| 宁都县| 香格里拉县| 荆门市| 新沂市| 家居| 张家界市| 太白县| 库伦旗| 天全县| 大宁县| 大宁县|