Reputation: 163
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 ?
Upvotes: 0
Views: 76
Reputation: 70732
Your expression is incorrect, using a preceding *
before the dot .
will not be recognized.
Try using the following:
AliasMatch /([^/]*\.nff).*$ /srv/samba/Assets/$1
Upvotes: 1
Reputation: 785186
Can you try this regex instead:
AliasMatch /([^./]+\.nff)$ /srv/samba/Assets/$1
Upvotes: 0