PDA

View Full Version : 404 pages for subdomains?


violet
11-15-2001, 06:58 AM
I was wondering if my hostees can have their own 404 pages for their subdomains? Or will they just see the main account 404 page?

DCE
11-15-2001, 08:49 AM
Just put a .htaccess file in the subdomain root folder with the following in it
ErrorDocument 404 /path/to/your/clients/404.htm
Obviously, you will need to create the 404 pages or 401, 403 etc

violet
11-20-2001, 06:20 AM
thanks a lot, but I'm afraid I didn't quite understand it.. *feels stupid*. ^_^;;; I'm not sure what a .htaccess file is.

DCE
11-20-2001, 10:31 AM
OK, I'm presuming that you are running some flavour of Windows

Start a new file in *notepad* and save it as htaccess
Make the very top line of that text file read ErrorDocument 404 some_folder/404.htm (where some_folder is the name of a folder you created to store your error documents in)
Now upload that into public_html/subdomain/ (ie the root folder for the sub)
Then go into *filemanager* in your control panel and re-name it from htaccess.txt to .htaccess
Now you need to just create your error documents and name them 404.htm (or 403 etc)
Then upload them to the folder that you want to store them in (above I used the example some_folder)

That's it :)

violet
11-22-2001, 12:50 PM
thanks! =)
Is it the the same routine you use when making an ordinary 404 page, you just upload it into the root of the subdomain instead...?

DCE
11-22-2001, 12:59 PM
Originally posted by violet
thanks! =)
Is it the the same routine you use when making an ordinary 404 page, you just upload it into the root of the subdomain instead...?
In a word, yes
If you're going to have different error pages throughout the domain, this is probably the best way to do it.

violet
12-14-2001, 03:32 PM
so I made two files - one html file and one htaccess.txt, with the ErrorDocument 404 /errordocuments/404.html inside... I made a new folder called errordocuments and uploaded the 404 file there, then I uploaded the htaccess.txt file to the root and renamed it .htaccess. But it doesn't work.. Any idea what I have wrong??

DCE
12-14-2001, 03:35 PM
Lose the slash before *errordocuments*

top5mov
12-14-2001, 04:49 PM
try putting the full path to the errordoc, starting with "http...."

Chameleon
12-14-2001, 10:50 PM
You don't have to save it as htaccess.txt and then change it in the file manager. You can save it as ".htaccess" (make sure you have the quotes) and it will save as .htaccess instead of htaccess.txt. Just to let you know.

~Chameleon

violet
12-15-2001, 07:37 AM
DCE: I tried without the slash first, didn't work either.
I'll try typing the full path.. report back in 5 minutes =)

violet
12-15-2001, 07:40 AM
YAY!!! It worked when I typed in the full path beginning with http://. Thanks SO MUCH for your help, everyone =D