0

Could be the following AliasMatch statements for Apache 2.4 combined into one?

AliasMatch ^/([0-9]{6})$ /var/www/data/$1
AliasMatch ^/([0-9]{6})/(.*)$ /var/www/data/$1/$2
Neurotransmitter
  • 468
  • 1
  • 6
  • 17

2 Answers2

2

BillThor only forgot to add the *s in the patterns. Either:

AliasMatch ^/([0-9]{6}(/.*)?)$ /var/www/data/$1

or

AliasMatch ^/([0-9]{6})((/.*)?)$ /var/www/data/$1$2

The first for preference.

Unbeliever
  • 2,336
  • 1
  • 10
  • 19
-1

You have full regular expressions for the match so either of these should work.

AliasMatch ^/([0-9]{6}(/.*)?)$ /var/www/data/$1
AliasMatch ^/([0-9]{6})((/.*)?)$ /var/www/data/$1$2
BillThor
  • 27,737
  • 3
  • 37
  • 69