0

I am trying to map a URL based on the filename it has to a fileshare directory. Here is the URL that i am using http://x.x.x.x/606547/abc.xyz.aaa/MOVIE/some.video.file-xxxxxxxx.nff?c=564378 (Where .nff is file extension).

And here is the ALiasMatch settings i have configured in default sites config file. The apache2 is running on ubuntu.

AliasMatch ^/[.?]/(*.nff)$ /srv/samba/Assets/$1
    <Directory "/srv/samba/Assets">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        #Order deny,allow
        #Deny from all
        #Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

I am getting forbidden error when i runt hat URL in browser. I file directory/file permissions are correct. Can you anyone please suggest is this problem with regex or problem with configuration ?

Suresh
  • 153
  • 2
  • 2
  • 9

2 Answers2

1

Your expression is incorrect, using a preceding * before the dot . will not be recognized.

Try using the following:

AliasMatch /([^/]*\.nff).*$ /srv/samba/Assets/$1
hwnd
  • 69,796
  • 4
  • 95
  • 132
0

Can you try this regex instead:

AliasMatch /([^./]+\.nff)$ /srv/samba/Assets/$1
anubhava
  • 761,203
  • 64
  • 569
  • 643