Guest Posted December 7, 2008 Share Posted December 7, 2008 Hello all, I've been searching for a definitive way to do this, and I've found things that beat around the bush, but never quite did what I wanted. I want to block direct access to a folder and all its sub directories, but allow access for internal requests; like when a page loads external stylesheets or images. And this has to be in an .htaccess file--so the Directory directive won't work. I've tried exploring the principle for preventing hotlinking (checking the referrer), but I haven't actually tried it, and would also like to know if there are any other options. Any help is appreciated. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/135859-solved-blocking-folder-access-from-all-but-internal-requests/ Share on other sites More sharing options...
Guest Posted December 7, 2008 Share Posted December 7, 2008 Bah, forgive me. Minutes after I posted this, I remembered I could have done an 402 redirect with rewriterule. And on top of that, I should have put this into the mod_Rewrite category! Sorry for the trouble! Link to comment https://forums.phpfreaks.com/topic/135859-solved-blocking-folder-access-from-all-but-internal-requests/#findComment-708210 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.