Jump to content

How To Make A 404 Page


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.

Edited by Deirdre's Dad
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...