.htaccess
Hey! I'm not sure where this post should go, so I decided to post it here.
How can i use .htaccess to take my visitors to a custom 404 error page? What do I write? What should be the URL? I am completely confused!!! Please help me!
Hey! I'm not sure where this post should go, so I decided to post it here.
How can i use .htaccess to take my visitors to a custom 404 error page? What do I write? What should be the URL? I am completely confused!!! Please help me!
Suzanne posted this at 00:17 — 15th March 2002.
She has: 5,507 posts
Joined: Feb 2000
Basic format: ErrorDocument [3-digit code] [action]
Custom page: ErrorDocument 404 /404.html
Custom comment on a regular 404 page: ErrorDocument 404 "Sorry, this page doesn't exist.
cdscl posted this at 01:19 — 15th March 2002.
They have: 29 posts
Joined: Feb 2002
So...
If I made a 404 error page and stored it at 404.html , then I would create a file called... 404.htaccess and write "ErrorDocument 404 /404.html ?"
Thank you for your help, but do you think that you could explain to me what .htaccess files are? Do you create a new file called something.htaccess or are they already there?
I'm sorry, I'm new to all this. I do appreciate your help very much, though. Thank you!
Suzanne posted this at 01:49 — 15th March 2002.
She has: 5,507 posts
Joined: Feb 2000
dahlink, if you don't know what something is, perhaps you should mention that!
apache.org --> search for "custom error"
The file is called .htaccess There is nothing before the period.
This file goes in the directory it applies to, and if you put it in the root directory, it applies to all other directories. If the lower (nested) directories have an .htaccess, that .htaccess will override the root .htaccess.
Yes, there is usually one there already, no you can't see it in most ftp applications.
Suzanne posted this at 01:52 — 15th March 2002.
She has: 5,507 posts
Joined: Feb 2000
http://httpd.apache.org/docs-2.0/mod/core.html#errordocument
If you search for "ErrorDocument" the second option is pretty nifty, too.
cdscl posted this at 14:27 — 17th March 2002.
They have: 29 posts
Joined: Feb 2002
Thank you very much! That helps me out a lot!
mairving posted this at 19:01 — 17th March 2002.
They have: 2,256 posts
Joined: Feb 2001
.htaccess is an example of a dot file. A file that begins with a period is a hidden file in 'Nix based Operating Systems. Most hosts generally have a backend control panel that allows you to password protect a directory with .htaccess the gui way rather than the command line way.
Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states
hotcut posted this at 15:42 — 23rd March 2002.
They have: 133 posts
Joined: Sep 2000
is this used on IIS as well, or how do you do it there?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.