dangercrow Posted January 24, 2010 Share Posted January 24, 2010 http://www.w3.org/icons/Can be just listed as an indexed thing, and i dont want that, and was wondering how to make a 404 page, or a redirect back to home page.I didn't knwo where else to put this post, so sorry if its in the wrong place Link to comment Share on other sites More sharing options...
jeffman Posted January 24, 2010 Share Posted January 24, 2010 Assuming your server is Apache:Put a file in that directory called .htaccessThe dot is required. It might make the file invisible, so it would be better to edit the file while it has a different name, and then change the name when you are done.The entire content of the file is this:deny from allYou will still have ftp access to the directory. Only http access is denied. Link to comment Share on other sites More sharing options...
boen_robot Posted January 24, 2010 Share Posted January 24, 2010 Note that the technique above creates a "403 Forbidden" page at that URL. I think you may also have to add to the .htaccess file something to explicitly allow all files in it (assuming that's what you want).I think a simpler way to disable directory indexing, while still allowing all files to be accessible is to use Options -Indexes in the .htaccess file.Alternatively, if you want to redirect users somewhere, you can use Redirect /icons/ http://example.com/ (replacing http://example.com/ with the actual location of course) Link to comment Share on other sites More sharing options...
jeffman Posted January 25, 2010 Share Posted January 25, 2010 Ah! Maybe I misunderstood. If all that seems too complicated, and you just want to avoid directory indexing, you can always put a blank file in there called index.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.