开发者

AliasMatch regex syntax

开发者 https://www.devze.com 2023-03-08 01:26 出处:网络
Can someone point me towards why this AliasMatch regex isn\'t working (throwing a 404, not server error):

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

精彩评论

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