.htaccess重写规则,在URL末尾添加html

时间:2015-08-24 02:00:18

标签: apache .htaccess

我的htaccess文件中有以下规则:

RewriteRule shop/hats/([0-9]+)/ shop/item.php?id=$1

这将重写如下的网址:

http://www.example.com/shop/item.php?id=3

要:

http://www.example.com/shop/hats/2/

我的问题是,如何修改此网址以将网址重写为:

http://www.example.com/shop/hats/2.html

0 个答案:

没有答案