最近一直在使用htaccess文件创建重写。对URL和ReWrite规则不起作用的更改
一切运作良好,但已经取得了最近的变化,包括类别名称其次是产品,像这样:
http://localhost/Limestone_Tiles/products/Antalya_Blanc.html
它只是用来为:
http://localhost/products/Antalya_Blanc.html
当一切工作好。其中,如下重写规则:
RewriteRule ^products/(.*).html$ product_details.php?&furl=$1 [NC,L]
RewriteRule ^products/images/(.*)$ images/$1
RewriteRule ^products/picture_upload/(.*)$ picture_upload/$1
RewriteRule ^products/thumbnail.php(.*)$ thumbnail.php$1
因此,为了适应新的变化,我已经改变了重写规则如下:
RewriteRule ^(.*)/products/(.*).html$ product_details.php?&furl=$1 [NC,L]
RewriteRule ^(.*)/products/images/(.*)$ images/$1
RewriteRule ^(.*)/products/picture_upload/(.*)$ picture_upload/$1
RewriteRule ^(.*)/products/thumbnail.php(.*)$ thumbnail.php$1
现在这种作品,因为
http://localhost/Limestone_Tiles/products/Antalya_Blanc.html
请问
加载,但没有一个图像 - 当页面没有任何意义时为什么不显示图像?
如果我改变重写规则:
重写规则^ Limestone_Tiles /产品/图片/(.*)$图像/ $ 1
的图像将载入该特定类别!
如果我把图像的URL到浏览器:
http://localhost/Limestone_Tiles/products/images/face.png
我得到了如下信息:
所请求的网址/图片/ Limestone_Tiles在此服务器上找到。
这也是奇怪的/ images/Limestone_Tiles不是我刚刚粘贴到地址栏的网址。
也许我的重写规则还不正确?
非常感谢您的帮助提前。
太棒了 - 工作很棒!也可以看看你的建议。非常感谢 – mflammia