Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following config - please notice the Alias and Directory equivalent -- uncommented they work as expected but the dynamic/regex based versions don't - any ideas???

<VirtualHost *:80>

  DocumentRoot "C:\wamp\www\temp\public"

  <Directory "C:\wamp\www\temp\public">
    AllowOverride all
    Order Allow,Deny
    Allow from all

  # Alias /private/application/core/page/assets/images/ "C:/wamp/www/temp/private/application/core/page/assets/images/"
  # <Directory "C:/wamp/www/temp/private/application/core/page/assets/images/">

  AliasMatch ^/private/application/(.*)/(.*)/assets/images/ /private/application/$1/$2/assets/images/
  <DirectoryMatch "^/private/application/(.*)/(.*)/assets/images/">
    Options Indexes FollowSymlinks MultiViews Includes
    AllowOverride None
    Order allow,deny
    Allow from all

share|improve this question

The AliasMatch there isn't altering the path at all - I'm gonna guess that's not intended?

AliasMatch ^/private/application/(.*)/(.*)/assets/images/ /private/application/$1/$2/assets/images/

Change to:

AliasMatch ^/private/application/([^/]*)/([^/]*)/assets/images/ "C:/wamp/www/temp/private/application/$1/$2/assets/images/"

aside: I swapped the .*s to avoid matching /, to avoid some unintentional hits to the matches.

Your DirectoryMatch also contains a URL path and not the filesystem path. It can probably just be:

<Directory "C:/wamp/www/temp/private/application/">

The config you have in there would work great for a LocationMatch, though, if you prefer:

<LocationMatch "^/private/application/[^/]*/[^/]*/assets/images/">
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.