【发布时间】:2015-12-28 18:49:41
【问题描述】:
我正在重建我的一个网站(重新设计 + pdo 而不是常规的 mysql)。 到目前为止一切顺利,除了 .htaccess 中的 1 个 RewriteRule 之外,一切正常。
我所有的 url 重写都符合这种规则:
RewriteRule pages/(.*)/ index.php?type=page&page=$1&%{QUERY_STRING}
RewriteRule pages/(.*) index.php?type=page&page=$1&%{QUERY_STRING}
(注意:利用index.php)
对于我的购物车,我想使用一个干净、独立的页面,并遵循以下规则:
RewriteRule ^shop/shopping-cart-overview/$ /pages/shoppingcart/overview.php
RewriteRule ^shop/shopping-cart-overview$ /pages/shoppingcart/overview.php
问题:不是使用文件“/pages/shoppingcart/overview.php”,而是像其他规则一样使用index.php。
我上传了完整的 txt 格式的 htaccess,所以你可以自己阅读: www.mymobisite.be/htaccess.txt
提前感谢您的时间、帮助和建议!
汤姆五世
【问题讨论】:
标签: apache .htaccess mod-rewrite