我需要在apache中为2个条件编写一个简单的重写
输入网址: /etc/designs/myapp/clientlibs/basefooter/js/foresee/foresee-trigger.20160819.js
输出网址: /etc/designs/myapp/clientlibs/basefooter/jsmin/foresee/foresee-trigger.js
我试过以下规则:
RewriteRule ^/etc/designs/myapp/clientlibs/basefooter/js/(.*).(0-9).js /etc/designs/myapp/clientlibs/basefooter/js/$1.js
RewriteRule ^/etc/designs/myapp/clientlibs/basefooter/js/(.*).js /etc/designs/myapp/clientlibs/basefooter/jsmin/$1.js
注意:
它适用于第二条规则,但第一条规则失败。你能帮忙写一下规则吗?
答案 0 :(得分:0)
您的正则表达式需要修改
(.*)\.([0-9].+)\.js
解释