根目录建一个.htaccess文件,方法是你可以新建一个记事本,然后另存为.htaccess,记得后面千万不要有.txt,要不然是不好用的。然后新建一个记事本,把你刚刚做好的.htaccess文件拖拽到记事本当中。然后在记事本当中写入
FilesMatch\"\\.(bak|inc|lib|sh|tpl|lbi|dwt)$\"
orderdeny,allow
denyfromall
/FilesMatch
RewriteEngineOn
#RewriteBase/
#directone-wordaccess
RewriteRule^index\\.html$index\\.php[L]
RewriteRule^category$index\\.php[L]
RewriteRule^flow\\.html$flow\\.php[L]
RewriteRule^user\\.html$user\\.php[L]
RewriteRule^message\\.html$message\\.php[L]
RewriteRule^search\\.html$search\\.php[L]
#accessanyobjectbyitsnumericidentifier
RewriteRule^feed-c([0-9])\\.xml$feed\\.php\\?cat=$1[L]
RewriteRule^feed-b([0-9])\\.xml$feed\\.php\\?brand=$1[L]
RewriteRule^feed-type([^-])\\.xml$feed\\.php\\?type=$1[L]
RewriteRule^feed\\.xml$feed\\.php[L]
RewriteRule^category-([0-9])-b([0-9])-min([0-9])-max([0-9])-attr([^-]*)-([0-9])-(.)-([a-zA-Z])(.*)\\.html$category\\.php\\?id=$1defds123brand=$2defds123price_min=$3defds123price_max=$4defds123filter_attr=$5defds123page=$6defds123sort=$7defds123order=$8[QSA,L]
RewriteRule^category-([0-9])-b([0-9])-min([0-9])-max([0-9])-attr([^-]*)(.*)\\.html$category\\.php\\?id=$1defds123brand=$2defds123price_min=$3defds123price_max=$4defds123filter_attr=$5[QSA,L]
RewriteRule^category-([0-9])-b([0-9])-([0-9])-(.)-([a-zA-Z])(.*)\\.html$category\\.php\\?id=$1defds123brand=$2defds123page=$3defds123sort=$4defds123order=$5[QSA,L]
RewriteRule^category-([0-9])-b([0-9])-([0-9])(.*)\\.html$category\\.php\\?id=$1defds123brand=$2defds123page=$3[QSA,L]
RewriteRule^category-([0-9])-b([0-9])(.*)\\.html$category\\.php\\?id=$1defds123brand=$2[QSA,L]
RewriteRule^category-([0-9])(.*)\\.html$category\\.php\\?id=$1[QSA,L]
RewriteRule^goods-([0-9])(.*)\\.html$goods\\.php\\?id=$1[QSA,L]
RewriteRule^article_cat-([0-9])-([0-9])-(.)-([a-zA-Z])(.*)\\.html$article_cat\\.php\\?id=$1defds123page=$2defds123sort=$3defds123order=$4[QSA,L]
RewriteRule^article_cat-([0-9])-([0-9])(.*)\\.html$article_cat\\.php\\?id=$1defds123page=$2[QSA,L]
RewriteRule^article_cat-([0-9])(.*)\\.html$article_cat\\.php\\?id=$1[QSA,L]
RewriteRule^article-([0-9])(.*)\\.html$article\\.php\\?id=$1[QSA,L]
RewriteRule^brand-([0-9])-c([0-9])-([0-9])-(.)-([a-zA-Z])\\.htmlbrand\\.php\\?id=$1defds123cat=$2defds123page=$3defds123sort=$4defds123order=$5[QSA,L]
RewriteRule^brand-([0-9])-c([0-9])-([0-9])(.*)\\.htmlbrand\\.php\\?id=$1defds123cat=$2defds123page=$3[QSA,L]
RewriteRule^brand-([0-9])-c([0-9])(.*)\\.htmlbrand\\.php\\?id=$1defds123cat=$2[QSA,L]
RewriteRule^brand-([0-9])(.*)\\.htmlbrand\\.php\\?id=$1[QSA,L]
RewriteRule^tag-(.*)\\.htmlsearch\\.php\\?keywords=$1[QSA,L]
RewriteRule^snatch-([0-9])\\.html$snatch\\.php\\?id=$1[QSA,L]
RewriteRule^group_buy-([0-9])\\.html$group_buy\\.php\\?act=viewdefds123id=$1[QSA,L]
RewriteRule^auction-([0-9])\\.html$auction\\.php\\?act=viewdefds123id=$1[QSA,L]
RewriteRule^exchange-id([0-9])(.*)\\.html$exchange\\.php\\?id=$1defds123act=view[QSA,L]
RewriteRule^exchange-([0-9])-min([0-9])-max([0-9])-([0-9])-(.)-([a-zA-Z])(.*)\\.html$exchange\\.php\\?cat_id=$1defds123integral_min=$2defds123integral_max=$3defds123page=$4defds123sort=$5defds123order=$6[QSA,L]
RewriteRule^exchange-([0-9])-([0-9])-(.)-([a-zA-Z])(.*)\\.html$exchange\\.php\\?cat_id=$1defds123page=$2defds123sort=$3defds123order=$4[QSA,L]
RewriteRule^exchange-([0-9])-([0-9])(.*)\\.html$exchange\\.php\\?cat_id=$1defds123page=$2[QSA,L]
RewriteRule^exchange-([0-9])(.*)\\.html$exchange\\.php\\?cat_id=$1[QSA,L]
#404page
ErrorDocument404/404.html
然后保存,就可以用了,还有记得在后台要开启静态功能。
我的可以用,测试没有问题,你如果还有问题,可以继续提问。
|