Kalikali 0 Posted February 19, 2012 Share Posted February 19, 2012 Dear gurus I have a website of my music band and we share our sample music .mp3 on the site. My question is how do I deny the direct access www.example.com/song.mp3 and whever user access the .mp3 link will redirect them to a single page www.example.com/download.php and force them to read our download term with a check box before proceed download the file. Please help. I been searching high and low for this solution and found none Quote Link to post Share on other sites
TCH-Dick 25 Posted February 20, 2012 Share Posted February 20, 2012 Personally I would store all the files in a directory with an htaccess using the single line "deny from all". Then I would just give my links out as example.com/download.php?song=some.mp3. Doing so in this manner would completely eliminate the direct access and depending on your download script, possible hide the actual file path. Quote Link to post Share on other sites
Kalikali 0 Posted February 20, 2012 Author Share Posted February 20, 2012 Hi sir. Can u assist on how to do it? Quote Link to post Share on other sites
TCH-Dick 25 Posted February 23, 2012 Share Posted February 23, 2012 You would just create a file named .htaccess in your mp3 dir and add the following line to that file. >deny from all As for your download script, that is all going to depend on how you choose to code it and what scripting language you choose. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.