Zen Cart Logo
Forums / General Questions / Video Product downloads don't work for .mp4 ?

Video Product downloads don't work for .mp4 ?

Views: 846

Results 1 to 2 of 2
18 Sep 2013, 3:51 AM
#1
nadiausa avatar

nadiausa

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
82
Plugin Contributions:
0

Video Product downloads don't work for .mp4 ?

I have a store that I sell video downloads. I have stuck to .wmv format because that works well. But .mp4 downloads always give a customer a 404 page not found error. It will work if you compress it into a .zip file but there seems to be a special limit on allowing .mp4 as a downloadable product.

Any advice?

Regards,
Nadia

18 Sep 2013, 4:13 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,099
Plugin Contributions:
56

Re: Video Product downloads don't work for .mp4 ?

Look at the two files /downloads/.htaccess and /pub/.htaccess. Towards the middle of the file, you'll see the lines:

# but now allow just *certain* necessary files:
<FilesMatch ".*\.(zip|ZIP|gzip|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub)$">
  Order Allow,Deny
  Allow from all
</FilesMatch>

<IfModule mod_headers.c>
  <FilesMatch ".*\.(zip|ZIP|gzip|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub)$">
    # tell all downloads to automatically be treated as "save as" instead of launching in an application directly
    # ALERT: ForceType requires Apache2 or later. If using older version of Apache, it will need mod_mime installed. Or just comment out the ForceType line below
    # (to disable, just comment the next 2 lines by adding a '#' at the beginning of each):
    ForceType application/octet-stream
    Header set Content-Disposition attachment
  </FilesMatch>
</IfModule>

You'll need to modify two lines in each of those files to add a file extension of mp4 as valid:

# but now allow just *certain* necessary files:
<FilesMatch ".*\.(zip|ZIP|gzip|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub|mp4|MP4)$">
  Order Allow,Deny
  Allow from all
</FilesMatch>

<IfModule mod_headers.c>
  <FilesMatch ".*\.(zip|ZIP|gzip|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub|mp4|MP4)$">
    # tell all downloads to automatically be treated as "save as" instead of launching in an application directly
    # ALERT: ForceType requires Apache2 or later. If using older version of Apache, it will need mod_mime installed. Or just comment out the ForceType line below
    # (to disable, just comment the next 2 lines by adding a '#' at the beginning of each):
    ForceType application/octet-stream
    Header set Content-Disposition attachment
  </FilesMatch>
</IfModule>