![]() PHP GODADDY PREVENT DIRECT URL TO FILE HOW TOYou can fine a lot of stuff on Google by issuing "mod_xsendfile php", which might also help a great deal. Instructions: All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin: die ('No access') Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site. You'll also have to drop in some lines to configure it and setup a proper rewrite. In order for this to work you'll have to have mod_xsendfile ( ) installed on your Apache, which is probably already the case for your hoster. The example script can be something like: $file = '/tmp/file.mp4' // it is in your best interest to make this file inaccessible for a direct download If not, you may as well output a 403 HTTP code. It tells the web-server to actually serve the static file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |