偉大的互聯(lián)網(wǎng)真是無所不能,只要你想要的想知道的基本上都可以查詢得到,但是林子大了什么鳥都有,很多站點網(wǎng)站分享的東西不太負責,經(jīng)常會有一些問題,所有361源碼一直秉著認真踏實的態(tài)度給廣大草根站長傳授相關(guān)網(wǎng)站技巧和經(jīng)驗。例如前面我們介紹過的《ecshop的web.config格式偽靜態(tài)規(guī)則》《ecshop的httpd.ini格式偽靜態(tài)規(guī)則》等,今天要介紹的是ecshop偽靜態(tài)規(guī)則萬能版(htaccess格式)
RewriteEngine On
RewriteBase /#本規(guī)則由361源碼整理分享RewriteRule ^index/.html$ index/.php [L]RewriteRule ^category$ index/.php [L]RewriteRule ^(.*)feed-c([0-9]+)/.xml$ $1feed/.php/?cat=$2 [L]RewriteRule ^(.*)feed-b([0-9]+)/.xml$ $1feed/.php/?brand=$2 [L]RewriteRule ^(.*)feed-type([^-]+)/.xml$ $1feed/.php/?type=$2 [L]RewriteRule ^(.*)feed/.xml$ $1feed/.php [L]RewriteRule ^(.*)category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1category/.php/?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9 [QSA,L]RewriteRule ^(.*)category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1category/.php/?id=$2&brand=$3&page=$4&sort=$5&order=$6 [QSA,L]RewriteRule ^(.*)category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)/.html$ $1category/.php/?id=$2&brand=$3&page=$4 [QSA,L]RewriteRule ^(.*)category-([0-9]+)-b([0-9]+)(.*)/.html$ $1category/.php/?id=$2&brand=$3 [QSA,L]RewriteRule ^(.*)category-([0-9]+)(.*)/.html$ $1category/.php/?id=$2 [QSA,L]RewriteRule ^(.*)goods-([0-9a-zA-Z_]+)-([0-9]+)(.*)/.html$ $1goods/.php/?id=$3 [QSA,L]RewriteRule ^(.*)goods-([0-9]+)(.*)/.html$ $1goods/.php/?id=$2 [QSA,L]RewriteRule ^(.*)article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1article_cat/.php/?id=$2&page=$3&sort=$4&order=$5 [QSA,L]RewriteRule ^(.*)article_cat-([0-9]+)-([0-9]+)-(.+)(.*)/.html$ $1article_cat/.php/?id=$2&page=$3&keywords=$4 [QSA,L]RewriteRule ^(.*)article_cat-([0-9]+)-([0-9]+)(.*)/.html$ $1article_cat/.php/?id=$2&page=$3 [QSA,L]RewriteRule ^(.*)article_cat-([0-9]+)(.*)/.html$ $1article_cat/.php/?id=$2 [QSA,L]RewriteRule ^(.*)article-([0-9]+)(.*)/.html$ $1article/.php/?id=$2 [QSA,L]RewriteRule ^(.*)brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)/.html $1brand/.php/?id=$2&cat=$3&page=$4&sort=$5&order=$6 [QSA,L]RewriteRule ^(.*)brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)/.html $1brand/.php/?id=$2&cat=$3&page=$4 [QSA,L]RewriteRule ^(.*)brand-([0-9]+)-c([0-9]+)(.*)/.html $1brand/.php/?id=$2&cat=$3 [QSA,L]RewriteRule ^(.*)brand-([0-9]+)(.*)/.html $1brand/.php/?id=$2 [QSA,L]RewriteRule ^(.*)tag-(.*)/.html $1search/.php/?keywords=$2 [QSA,L]RewriteRule ^(.*)snatch-([0-9]+)/.html$ $1snatch/.php/?id=$3 [QSA,L]RewriteRule ^(.*)group_buy-([0-9]+)/.html$ $1group_buy/.php/?act=view&id=$2 [QSA,L]RewriteRule ^(.*)auction-([0-9]+)/.html$ $1auction/.php/?act=view&id=$2 [QSA,L]RewriteRule ^(.*)exchange-id([0-9]+)(.*)/.html$ $1exchange/.php/?id=$2&act=view [QSA,L]RewriteRule ^(.*)exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1exchange/.php/?cat_id=$2&integral_min=$3&integral_max=$4&page=$5&sort=$6&order=$7 [QSA,L]RewriteRule ^(.*)exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)/.html$ $1exchange/.php/?cat_id=$2&page=$3&sort=$4&order=$5 [QSA,L]RewriteRule ^(.*)exchange-([0-9]+)-([0-9]+)(.*)/.html$ $1exchange/.php/?cat_id=$2&page=$3 [QSA,L]RewriteRule ^(.*)exchange-([0-9]+)(.*)/.html$ $1exchange/.php/?cat_id=$2 [QSA,L]
上面的ECSHOP規(guī)則保證有效實用,但是也可能你在使用的時候出現(xiàn)不能使用的情況,那么你這個時候就需要考慮如下的情況:
(1)你的程序是二次開發(fā)得來的,有些鏈接結(jié)構(gòu)被修改過了,需要自定義偽靜態(tài)規(guī)則
(2)你服務器是否支持htaccess的偽靜態(tài)規(guī)則
(3)未知疑難雜癥……
如果您覺得這個規(guī)則仍有問題,可以361源碼的小編,我們會盡量完善。
以上就是ecshop偽靜態(tài)規(guī)則萬能版(htaccess格式)【推薦】的全部內(nèi)容,希望對大家的學習和解決疑問有所幫助,也希望大家多多支持武林網(wǎng)。新聞熱點
疑難解答