子目录中的HTACCESS重写规则404错误

时间:2018-06-21 13:41:23

标签: .htaccess

我在根目录http://www.example.com/中有一个网站,在根目录中有一个名为shop的文件夹作为子目录,因此请运行一个URL http://www.example.com/shop/barbecue_accessories-cid-10-1.html

这显示404错误,请帮助     

RewriteEngine On

RewriteBase /shop/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d


RewriteRule ^.*-cid-(2|9|7|10)-([0-9]+)\.html products2.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(34)-([0-9]+)\.html store-special-offers.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(3)-([0-9]+)\.html barbeque-smokers.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(4)-([0-9]+)\.html pig-roasters.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(5)-([0-9]+)\.html bbq-pits.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(6)-([0-9]+)\.html caterers-delight.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(44)-([0-9]+)\.html barbeque-catering-trailers.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(46)-([0-9]+)\.html ../barbeque-ebooks.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(48)-([0-9]+)\.html stainless-steel-sink.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(51)-([0-9]+)\.html commercial-flat-top-grills.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-(53)-([0-9]+)\.html backyard-bbq-cookers.php?pg$2-cid$1.html [L]
RewriteRule ^.*-cid-([0-9]+)-([0-9]+)\.html products.php?pg$2-cid$1.html [L]
RewriteRule ^.*-pid-([0-9]+)-(3|4|5|6|51|53)\.html product-info-cookers.php?pid$1.html [L]
RewriteRule ^.*-pid-([0-9]+)\.html product-info.php?pid$1.html [L]
RewriteRule ^.*-cms-([0-9]+)\.html cmspage.php?page_id=$1 [L]
</IfModule>

0 个答案:

没有答案