Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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>

  ServerName  temp.dev.local
  ServerAlias temp.dev.local
  DocumentRoot "C:\wamp\www\temp\public"

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

  # 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
  </DirectoryMatch>

</VirtualHost>
share|improve this question

1 Answer 1

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

 
discard

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.