1

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

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

I am trying to match:

/scripts/analytics/admin/index.js
Ashley
  • 5,939
  • 9
  • 39
  • 82

2 Answers2

2

I think you need to escape the .. Try this

AliasMatch (?i)^/scripts/(\w+)/admin/(\w+)\.js \cms\modules\$1\scripts\admin\$2.js
stema
  • 90,351
  • 20
  • 107
  • 135
  • @Ashley good that you found your problem, my next suggestion would have been to add other tags to your question, like "Apache", because I found this only because of "regex" and I assume the specialists for this problem hasn't seen this question. – stema May 25 '11 at 08:55
1

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

AliasMatch ^/scripts/(\w+)/admin/(\w+)\.js /cms/modules/$1/scripts/admin/$2.js
Ashley
  • 5,939
  • 9
  • 39
  • 82