关于ECSHOP程序设置页面静态的问题,求方法!

[复制链接]
查看11 | 回复3 | 2011-9-6 02:57:10 | 显示全部楼层 |阅读模式
我的网站服务器为2003IIS的,在网上找了很多方法来设置程序静态化,但都不成功,不知道是我操作上的问题,还是。。。。。总之问题还没解决!请求帮忙!
回复

使用道具 举报

千问 | 2011-9-6 02:57:10 | 显示全部楼层
根目录建一个.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


然后保存,就可以用了,还有记得在后台要开启静态功能。

我的可以用,测试没有问题,你如果还有问题,可以继续提问。
回复

使用道具 举报

千问 | 2011-9-6 02:57:10 | 显示全部楼层
额3
回复

使用道具 举报

千问 | 2011-9-6 02:57:10 | 显示全部楼层
文件名:httpd.ini



[ISAPI_Rewrite]

#3600=1hour
CacheClockRate3600

RepeatLimit32

#Protecthttpd.iniandhttpd.parse.errorsfiles
#fromaccessingthroughHTTP

RewriteCond%{HTTP:Host}<ahref=\"http://www.\"target=\"_blank\">www.</a>你的网站.com

RewriteRule^(.*)/index.html$$1/index\\.php
RewriteRule^(.*)/category$$1/index\\.php
RewriteRule^(.*)/feed-c([0-9]).xml$$1/feed\\.php\\?cat=$2
RewriteRule^(.*)/feed-b([0-9]).xml$$1/feed\\.php\\?brand=$2
RewriteRule^(.*)/feed.xml$$1/feed\\.php
RewriteRule^(.*)/category-([0-9])-b([0-9])-min([0-9])-max([0-9])-attr([^-]*)-([0-9])-(.)-([a-zA-Z])(.*)\\.html$$1/category\\.php\\?id=$2defds123brand=$3defds123price_min=$4defds123price_max=$5defds123filter_attr=$6defds123page=$7defds123sort=$8defds123order=$9
RewriteRule^(.*)/category-([0-9])-b([0-9])-min([0-9])-max([0-9])-attr([^-]*)\\.html$$1/category\\.php\\?id=$2defds123brand=$3defds123price_min=$4defds123price_max=$5defds123filter_attr=$6
RewriteRule^(.*)/category-([0-9])-b([0-9])-([0-9])-(.)-([a-zA-Z])(.*)\\.html$$1/category\\.php\\?id=$2defds123brand=$3defds123page=$4defds123sort=$5defds123order=$6
RewriteRule^(.*)/category-([0-9])-b([0-9])-([0-9])(.*)\\.html$$1/category\\.php\\?id=$2defds123brand=$3defds123page=$4
RewriteRule^(.*)/category-([0-9])-b([0-9])(.*)\\.html$$1/category\\.php\\?id=$2defds123brand=$3
RewriteRule^(.*)/category-([0-9])(.*)\\.html$$1/category\\.php\\?id=$2
RewriteRule^(.*)/goods-([0-9])(.*)\\.html$$1/goods\\.php\\?id=$2
RewriteRule^(.*)/article_cat-([0-9])-([0-9])-(.)-([a-zA-Z])(.*)\\.html$$1/article_cat\\.php\\?id=$2defds123page=$3defds123sort=$4defds123order=$5
RewriteRule^(.*)/article_cat-([0-9])-([0-9])(.*)\\.html$$1/article_cat\\.php\\?id=$2defds123page=$3
RewriteRule^(.*)/article_cat-([0-9])(.*)\\.html$$1/article_cat\\.php\\?id=$2
RewriteRule^(.*)/article-([0-9])(.*)\\.html$$1/article\\.php\\?id=$2
RewriteRule^(.*)/brand-([0-9])-c([0-9])-([0-9])-(.)-([a-zA-Z])\\.html$1/brand\\.php\\?id=$2defds123cat=$3defds123page=$4defds123sort=$5defds123order=$6
RewriteRule^(.*)/brand-([0-9])-c([0-9])-([0-9])(.*)\\.html$1/brand\\.php\\?id=$2defds123cat=$3defds123page=$4
RewriteRule^(.*)/brand-([0-9])-c([0-9])(.*)\\.html$1/brand\\.php\\?id=$2defds123cat=$3
RewriteRule^(.*)/brand-([0-9])(.*)\\.html$1/brand\\.php\\?id=$2
RewriteRule^(.*)/tag-(.*)\\.html$1/search\\.php\\?keywords=$2
RewriteRule^(.*)/snatch-([0-9])\\.html$$1/snatch\\.php\\?id=$2
RewriteRule^(.*)/group_buy-([0-9])\\.html$$1/group_buy\\.php\\?act=viewdefds123id=$2

我正在用的伪静态
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行