Carbunkulous Posted January 30, 2009 Share Posted January 30, 2009 I run the site http://www.willhostforfood, and with the new version hot linking will be gracefully degraded too the download page.. but i'm having a slight problem.. I want the page too go back to the download page, even if they type the hotlink directly into the URL bar, only too actually allow them too download if they get redirected through my dl.php script. (It just uses header(location:)) ... is there anything I can do to GRACEFULLY degrade it? I know i could chmod the files low enough and then raise the permissions when the DL button is pressed, but that would stop any hot linkers completely.. I want it too go back to the DL page. My current code consists of: RewriteEngine on RewriteRule ^files/([0-9])$ /files/$1/*.* [R] RewriteRule ^files/([0-9])/$ /hotlink.php?Folder=$1 the folders are stored in this sort of directory files/rand(0,1000000)/filename.fileext If it is declared not from the DL page, I want it too redirect too hotlink.php?Folder=[the rand() part] From there I can redirect too the DL page, so don't worry about that I don't need the actual filename, i just need which folder it is stored in... any help would be appreciated.. Quote Link to comment https://forums.phpfreaks.com/topic/143170-help-with-mod_rewrite-tricky-hotlinking-problem/ Share on other sites More sharing options...
corbin Posted February 1, 2009 Share Posted February 1, 2009 I might just be having a slow moment, but I'm confused. Can you give an example of a situation and what the URLs would be? Quote Link to comment https://forums.phpfreaks.com/topic/143170-help-with-mod_rewrite-tricky-hotlinking-problem/#findComment-751802 Share on other sites More sharing options...
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.