Apache AliasMatch and DirectoryMatch not working?

Posted by Alex on Server Fault See other posts from Server Fault or by Alex
Published on 2011-09-30T17:42:35Z Indexed on 2014/05/29 3:32 UTC
Read the original article Hit count: 346

Filed under:

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>

© Server Fault or respective owner

Related posts about apache-2.2