insidus Posted June 15, 2012 Share Posted June 15, 2012 So for my website, i have a folder structure of /styles/ /js/ /includes/ etc. if i navigate to those folder locations in the url, it shows a file/directly listing of whats inside. Is there a way of throwing a 404 error if they are accessed? or do i have to do it by using a index.php file? /insidus Link to comment https://forums.phpfreaks.com/topic/264234-restrict-access-to-a-directory/ Share on other sites More sharing options...
requinix Posted June 15, 2012 Share Posted June 15, 2012 Assuming you don't want directory indexes anywhere, in your root .htaccess Options -Indexes That will show 403 errors. Link to comment https://forums.phpfreaks.com/topic/264234-restrict-access-to-a-directory/#findComment-1354179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.