Jump to content

How To Make A 404 Page


dangercrow

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...