.htaccess mod_rewrite在IE中不能解释友好的URL(适用于FF,Chrome,Safari)

我在我的网页上使用mod_rewrite来允许正确处理友好的URL。 它在FF,Chrome和Safari中完美的工作,但在IE浏览器友好的url不断给我一个404错误(它不处理重写正确,所以它显示为404)。

有没有人有这方面的经验? 如果是的话,它是如何解决?

注意:我已经清除了caching,Cookie和会话,并重新启动了浏览器。 我使用IE 9,但也尝试过IE7和8,使用开发工具,没有运气在任何IE模式。 另外需要注意的是,IE可以重写一些页面,但是对于其他页面则不起作用。


用户访问:

www.mysite.com/products/99-shoes.html 

服务器将解释并从这里提供页面:

 www.mysite.com/product.php?id_product=99 

以下是我在.htaccess中使用的指令types的示例:

 <IfModule mod_rewrite.c> # URL rewriting module activation RewriteEngine on RewriteRule ^products/([0-9]+)-[a-zA-Z0-9-]*.html /product.php?id_product=$1 [QSA,L] </IfModule> # Catch 404 errors ErrorDocument 404 /404.php 

更新:额外信息
按照要求,我在下面提供了我的RewriteLog。 第一个是从我访问Chrome页面(正常工作)。 第二个是我在IE中访问页面时输出的内容。 我试图加载的页面是: http://localhost/products-fb/10-loop.html 。 我已经删除了一些重复的字符和时间戳,以坚持StackOverflow的30K字符限制。 如果您认为我可能删除了重要的内容,请告诉我,我可以上传.txt文件进行查看。

Chrome日志输出

 (2) init rewrite engine with requested uri /products-fb/10-loop.html (1) pass through /products-fb/10-loop.html (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^api/?(.*)$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'products-fb/10-loop.html' (3) [perdir C:/www/] add path info postfix: C:/www/products-fb -> C:/www/products-fb/10-loop.html (3) [perdir C:/www/] strip per-dir prefix: C:/www/products-fb/10-loop.html -> products-fb/10-loop.html (3) [perdir C:/www/] applying pattern '^products-fb/([0-9]+)-[a-zA-Z0-9-]*.html' to uri 'products-fb/10-loop.html' (2) [perdir C:/www/] rewrite 'products-fb/10-loop.html' -> '/product-fb.php?id_product=10' (3) split uri=/product-fb.php?id_product=10 -> uri=/product-fb.php, args=id_product=10 (1) [perdir C:/www/] internal redirect with /product-fb.php [INTERNAL REDIRECT] (2) init rewrite engine with requested uri /product-fb.php (1) pass through /product-fb.php (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^api/?(.*)$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^products-fb/([0-9]+)-[a-zA-Z0-9-]*.html' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^products-fb/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9]+)__([a-zA-Z0-9-]*)' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9]+)_([a-zA-Z0-9-]*)' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^content/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^content/category/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'product-fb.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/product-fb.php -> product-fb.php (3) [perdir C:/www/] applying pattern '^page-not-found$' to uri 'product-fb.php' (1) [perdir C:/www/] pass through C:/www/product-fb.php (2) init rewrite engine with requested uri /cart.php (1) pass through /cart.php (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^api/?(.*)$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^products-fb/([0-9]+)-[a-zA-Z0-9-]*.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^products-fb/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)__([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)_([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^content/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^content/category/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^page-not-found$' to uri 'cart.php' (1) [perdir C:/www/] pass through C:/www/cart.php 

IE日志输出

 (2) init rewrite engine with requested uri /page-not-found (1) pass through /page-not-found (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^api/?(.*)$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^products-fb/([0-9]+)-[a-zA-Z0-9-]*.html' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^products-fb/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9]+)__([a-zA-Z0-9-]*)' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9]+)_([a-zA-Z0-9-]*)' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^content/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^content/category/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'page-not-found' (3) [perdir C:/www/] strip per-dir prefix: C:/www/page-not-found -> page-not-found (3) [perdir C:/www/] applying pattern '^page-not-found$' to uri 'page-not-found' (2) [perdir C:/www/] rewrite 'page-not-found' -> '/404.php' (1) [perdir C:/www/] internal redirect with /404.php [INTERNAL REDIRECT] (2) init rewrite engine with requested uri /404.php (1) pass through /404.php (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^api/?(.*)$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^products-fb/([0-9]+)-[a-zA-Z0-9-]*.html' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^products-fb/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9]+)__([a-zA-Z0-9-]*)' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9]+)_([a-zA-Z0-9-]*)' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^content/([0-9]+)\-([a-zA-Z0-9-]*)' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^content/category/([0-9]+)\-([a-zA-Z0-9-]*)' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^page-not-found$' to uri '404.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/404.php -> 404.php (3) [perdir C:/www/] applying pattern '^address$' to uri '404.php' (1) [perdir C:/www/] pass through C:/www/404.php (2) init rewrite engine with requested uri /cart.php (1) pass through /cart.php (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^api/?(.*)$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^products-fb/([0-9]+)-[a-zA-Z0-9-]*.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)\-[a-zA-Z0-9-]*' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^products-fb/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)__([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)_([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^content/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^content/category/([0-9]+)\-([a-zA-Z0-9-]*)' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$' to uri 'cart.php' (3) [perdir C:/www/] strip per-dir prefix: C:/www/cart.php -> cart.php (3) [perdir C:/www/] applying pattern '^page-not-found$' to uri 'cart.php' (1) [perdir C:/www/] pass through C:/www/cart.php 

这是一个非常有趣的问题。

我可以问你在你的问题中添加rewritelog和重写错误吗?

这是我平常的提示:

请尝试使用RewriteLog指令:它可以帮助你追踪这样的问题:

 # Trace: # (!) file gets big quickly, remove in prod environments: RewriteLog "/web/logs/mywebsite.rewrite.log" RewriteLogLevel 9 RewriteEngine On 

我最喜欢的工具来检查正则expression式:

http://www.quanetic.com/Regex (不要忘了selectereg(POSIX)而不是preg(PCRE)!)


我可以问你在你的问题中添加rewritelog和重写错误吗?

经过两天的挫折,解决scheme并不令人满意,似乎是IE9中的一些错误。 我使用了开发人员工具面板,并将工具>更改用户代理string从“默认”更改为“Google Chrome”。 然后页面加载正常。 一旦我将用户代理string设置回“默认”,页面仍然可以正常加载。 我真的不知道是什么或为什么发生,因为我以前从来没有玩过这些设置,但是我想把它发布给任何可能遭受这个困扰的人。