开发者

AliasMatch regex syntax

Can someone point me towards why this AliasMatch regex isn't working (throwing a 404, not server error):

AliasMatch (?i)^/scripts/(\w+)/ad开发者_高级运维min/(\w+).js \cms\modules\$1\scripts\admin\$2.js

I am trying to match:

/scripts/analytics/admin/index.js


I think you need to escape the .. Try this

AliasMatch (?i)^/scripts/(\w+)/admin/(\w+)\.js \cms\modules\$1\scripts\admin\$2.js


I needed to swap the backslashes for forward slashes (Windows)

AliasMatch ^/scripts/(\w+)/admin/(\w+)\.js /cms/modules/$1/scripts/admin/$2.js
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜