{"id":199105,"date":"2025-05-03T10:13:43","date_gmt":"2025-05-03T02:13:43","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199105\/"},"modified":"2025-05-03T10:13:43","modified_gmt":"2025-05-03T02:13:43","slug":"ecshop%e5%9c%a8%e5%ad%90%e7%9b%ae%e5%bd%95%e7%a9%ba%e9%97%b4%e4%b8%8b%e4%bc%aa%e9%9d%99%e6%80%81%e5%a4%b1%e6%95%88%e4%b8%8b%e7%9a%84%e8%a7%84%e5%88%99","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199105\/","title":{"rendered":"ecshop\u5728\u5b50\u76ee\u5f55\u7a7a\u95f4\u4e0b\u4f2a\u9759\u6001\u5931\u6548\u4e0b\u7684\u89c4\u5219"},"content":{"rendered":"<p>ecshop\u5728\u4e3b\u76ee\u5f55\u7f51\u7ad9\u6839\u76ee\u5f55\u4e0b\u4f7f\u7528.htaccess\u89c4\u5219\u53ef\u7528\uff0c\u4f46\u662f\u82e5\u662fgodaddy\u7b49\u4e3b\u673a\u7684\u5b50\u76ee\u5f55\u4e0b\u4f7f\u7528\u9ed8\u8ba4\u7684\u89c4\u5219\uff0c\u7f51\u7ad9\u4f2a\u9759\u6001\u76f4\u63a5\u5931\u6548\uff0c\u597d\u6a21\u677f\u9488\u5bf9\u8be5\u95ee\u9898\uff0c\u5bf9\u5b50\u76ee\u5f55\u4e0b\u89c4\u5219\u8fdb\u884c\u4e86\u4fee\u6b63\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;FilesMatch &#8220;\\.(bak|inc|lib|sh|tpl|lbi|dwt)$&#8221;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp;order deny,allow<\/p>\n<p>&nbsp;&nbsp; &nbsp;deny from all<\/p>\n<p>&lt;\/FilesMatch&gt;<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteEngine On<\/p>\n<p>RewriteBase \/<\/p>\n<p># direct one-word access<\/p>\n<p>RewriteRule ^index\\.html$ &nbsp; &nbsp;index\\.php [L]<\/p>\n<p>RewriteRule ^category$ &nbsp; &nbsp; &nbsp;index\\.php [L]<\/p>\n<p>&nbsp;<\/p>\n<p># access any object by its numeric identifier<\/p>\n<p>RewriteRule ^feed-c([0-9]+)\\.xml$ &nbsp; &nbsp; &nbsp; feed\\.php\\?cat=$1 [L]<\/p>\n<p>RewriteRule ^feed-b([0-9]+)\\.xml$ &nbsp; &nbsp; &nbsp; feed\\.php\\?brand=$1 [L]<\/p>\n<p>RewriteRule ^feed-type([^-]+)\\.xml$ &nbsp; &nbsp; &nbsp; feed\\.php\\?type=$1 [L]<\/p>\n<p>RewriteRule ^feed\\.xml$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; feed\\.php [L]<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$ &nbsp;category\\.php\\?id=$1&amp;brand=$2&amp;price_min=$3&amp;price_max=$4&amp;filter_attr=$5&amp;page=$6&amp;sort=$7&amp;order=$8 [QSA,L]<\/p>\n<p>RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;category\\.php\\?id=$1&amp;brand=$2&amp;price_min=$3&amp;price_max=$4&amp;filter_attr=$5 [QSA,L]<\/p>\n<p>RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;category\\.php\\?id=$1&amp;brand=$2&amp;page=$3&amp;sort=$4&amp;order=$5 [QSA,L]<\/p>\n<p>RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; category\\.php\\?id=$1&amp;brand=$2&amp;page=$3 &nbsp;[QSA,L]<\/p>\n<p>RewriteRule ^category-([0-9]+)-b([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;category\\.php\\?id=$1&amp;brand=$2 &nbsp;[QSA,L]<\/p>\n<p>RewriteRule ^category-([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;category\\.php\\?id=$1 &nbsp;[QSA,L]<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteRule ^goods-([0-9]+)(.*)\\.html$ &nbsp;goods\\.php\\?id=$1 [QSA,L]<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteRule ^article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$ &nbsp;article_cat\\.php\\?id=$1&amp;page=$2&amp;sort=$3&amp;order=$4 &nbsp;[QSA,L]<\/p>\n<p>RewriteRule ^article_cat-([0-9]+)-([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; article_cat\\.php\\?id=$1&amp;page=$2 &nbsp; [QSA,L]<\/p>\n<p>RewriteRule ^article_cat-([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;article_cat\\.php\\?id=$1 &nbsp; [QSA,L]<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteRule ^article-([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;article\\.php\\?id=$1 &nbsp; [QSA,L]<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\\.html &nbsp; brand\\.php\\?id=$1&amp;cat=$2&amp;page=$3&amp;sort=$4&amp;order=$5 [QSA,L]<\/p>\n<p>RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\\.html &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;brand\\.php\\?id=$1&amp;cat=$2&amp;page=$3 [QSA,L]<\/p>\n<p>RewriteRule ^brand-([0-9]+)-c([0-9]+)(.*)\\.html &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; brand\\.php\\?id=$1&amp;cat=$2 [QSA,L]<\/p>\n<p>RewriteRule ^brand-([0-9]+)(.*)\\.html &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; brand\\.php\\?id=$1 [QSA,L]<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteRule ^tag-(.*)\\.html &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; search\\.php\\?keywords=$1 [QSA,L]<\/p>\n<p>RewriteRule ^snatch-([0-9]+)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; snatch\\.php\\?id=$1 [QSA,L]<\/p>\n<p>RewriteRule ^group_buy-([0-9]+)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;group_buy\\.php\\?act=view&amp;id=$1 [QSA,L]<\/p>\n<p>RewriteRule ^auction-([0-9]+)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;auction\\.php\\?act=view&amp;id=$1 [QSA,L]<\/p>\n<p>&nbsp;<\/p>\n<p>RewriteRule ^exchange-id([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exchange\\.php\\?id=$1&amp;act=view [QSA,L]<\/p>\n<p>RewriteRule ^exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$ exchange\\.php\\?cat_id=$1&amp;integral_min=$2&amp;integral_max=$3&amp;page=$4&amp;sort=$5&amp;order=$6 [QSA,L]<\/p>\n<p>RewriteRule ^exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exchange\\.php\\?cat_id=$1&amp;page=$2&amp;sort=$3&amp;order=$4 [QSA,L]<\/p>\n<p>RewriteRule ^exchange-([0-9]+)-([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exchange\\.php\\?cat_id=$1&amp;page=$2 &nbsp;[QSA,L]<\/p>\n<p>RewriteRule ^exchange-([0-9]+)(.*)\\.html$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exchange\\.php\\?cat_id=$1 &nbsp;[QSA,L]<\/p>\n<p>&nbsp;<\/p>\n<p>\u76f4\u63a5\u590d\u5236\u4ee5\u4e0a\u4ee3\u7801\u4fdd\u5b58\u4e3a.htaccess \u653e\u5230\u5b50\u76ee\u5f55\u4e0b\u5c31\u53ef\u7528\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ecshop\u5728\u4e3b\u76ee\u5f55\u7f51\u7ad9\u6839\u76ee\u5f55\u4e0b&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-199105","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=199105"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199105\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}