I want to disable streaming video in my site

June 5, 2017 559 views
Apache CentOS


i had MP4 files in my web server.


when visitor paste the link in browser. it will play the video ..

so how i can disable that .. i want just force download file because i think streaming videos will make site slow

2 Answers

I suggest to turn (compress) them in WinRar for example or film.rar when you upload to your web, is a simple way to do it

Hi @mcgrykk64

You can create a .htaccess file and put it in /folder/, then edit the file to look like this:

<Location "/folder/">
    <Files *.mp4>
        ForceType application/octet-stream
        Header set Content-Disposition attachment

But it doesn't make any difference, since "viewing" a MP4 file and downloading it is usually handled the same way unless you have a streaming module installed in Apache, which it doesn't come with by default.

Have another answer? Share your knowledge.