开发者

.htaccess and RewriteRule expression

I have following urls domain/jcb-wine{number}.html and i need to rewrite them like domain/wines/{number} I do something like this

RewriteRule ^jcb-wine([0-9][0-开发者_如何学编程9])$ /wines/$

But this has no effect :(

my .htaccess

ErrorDocument 404 /404.shtml
Options +FollowSymLinks

RewriteEngine On
RewriteBase /
RewriteRule ^wine/([0-9]{2}) /jcb-wine$1.html

How to do this?


Shouldn't it be the other way round?

RewriteRule ^wine/([0-9]+) /jcb-wine$1.html


remove ^ оr write full uri like

RewriteRule ^/jcb-wine([0-9]+)/?$ /wines/$1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜