开发者

apache rewrite rule not working

I have the following rewrite rule:

RewriteEngine on
RewriteRule /stylesheets/[0-9]+/(.*)$      /stylesheets/$1 [L]

So in the html I 开发者_运维问答can say /stylesheets/05282011/xxx.css and it points to /stylesheets/xxx.css

This looks correct to me but can anyone spot why it wouldn't work?

Thanks


Problem is starting slash / because that is stripped by Apache. Try this rule:

RewriteRule ^stylesheets/[0-9]+/(.*)$  /stylesheets/$1 [L]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜