Forum Moderators: open

Message Too Old, No Replies

.htaccess files

         

nvision

10:35 am on Nov 13, 2001 (gmt 0)

10+ Year Member



I need to change the standard 404 error page on a website but the techies say they won't change it. Can I add my own .htaccess file anywhere so it will override their settings? How do I create the .htaccess file (ie. is it a simple notepad file with the .htaccess extension)?

gethan

12:04 pm on Nov 13, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi nvision.

Create a file named exactly ".htaccess" put it in the directory at the root of your web section (depends on your setup - but the same place as index.html)

With contents of


ErrorDocument 404 /404.html

Where 404.html is your error page also in the root of your web directory.

This will affect every directory below this directory. To customise each directory individually create other .htaccess files with "ErrorDocument 404 /subdirname/404.html" and place them in the subdir.

If you need some more complex behaviour search for ".htaccess 404" in site search - some good stuff comes up :)

Good luck

Gethan

nvision

12:07 pm on Nov 13, 2001 (gmt 0)

10+ Year Member



thanks, I'll try it asap.