|
| |
|
|
_gail
Posts: 2876 From: So FL Status: offline
|
Custom error pages & .htaccess problem - 7/11/2004 15:21:13
I followed Katherine's tutorial on creating custom error pages. Yet I must be doing something wrong. When I upload the new .htaccess page it shuts my site down. The tutorial says to create a directory called errors, then create .htm error pages and place them in the errors folder. The .htm pages should be named thus: error401.htm error404.htm error500.htm Then she says to add this exactly to the end of the .htaccess file: # Added for Custom Errors ErrorDocument 401 /errors/error401.htm ErrorDocument 404 /errors/error404.htm ErrorDocument 500 /errors/error500.htm I've tried this too: ErrorDocument 401 /errors/error401.htm ErrorDocument 404 /errors/error404.htm ErrorDocument 500 /errors/error500.htm Neither works! What am I missing? thanks, gail
< Message edited by _gail -- 7/11/2004 21:14:19 >
_____________________________
Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography
|
|
|
|
Giomanach
Posts: 6128 Joined: 11/19/2003 From: England Status: offline
|
RE: Custom error pages & .htaccess problem - 7/11/2004 15:59:17
Hows about: errors/error401.htm ? Dan
_____________________________
|
|
|
|
_gail
Posts: 2876 From: So FL Status: offline
|
RE: Custom error pages & .htaccess problem - 7/11/2004 16:11:04
Thanks Dan, but the tutorial says to do it exactly the way it was written: quote:
It is important that you use the exact syntax above - for example 'ErrorDocument', not 'errordocument'. Can I be doing something wrong here? quote:
You can of course change the file paths to the correct ones for your site. I have the errors folder in the root directory. Don't know if I have to add additional file paths when it's there. I'd love if someone could show me their code for an .htaccess file they've created for custom error pages which works successfully. thanks again, gail
_____________________________
Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography
|
|
|
|
Giomanach
Posts: 6128 Joined: 11/19/2003 From: England Status: offline
|
RE: Custom error pages & .htaccess problem - 7/11/2004 16:30:42
On the hosts I have used/still use, you have to set up Custom Error pages via the online CPanel, if you want I'll take a screen shot of a current client to show you what I mean. Are you uploading the .htaccess file to the root directory or the error directory? Dan
_____________________________
|
|
|
|
Nancy
Posts: 3626 Joined: 11/9/1999 From: Nebraska Status: offline
|
RE: Custom error pages & .htaccess problem - 7/11/2004 17:34:31
This topic intrigued me because I have a custom 404 error page, however I've always done it using the control panel. I then searched for the .htaccess file and although there is one in the root, I didn't see where it refers at all to the custom error pages. Next, while looking at the .htaccess file, I did see reference to FP. Since I thought I didn't have the FP extensions installed, I went to that section of the control panel to double check. I was correct - they are not installed, but I came across this message in the area to install them: "Installing or uninstalling FrontPage Extensions will result in the loss of all .htaccess files in your web area." Since I don't know if you have them installed or not, I thought I would mention this. It has been my understanding that: 1. if you have FP extensions installed, and if you publish your site using FP's publish feature, you likely will not be able to create and use your own .htaccess file. 2. FP extensions use their own implementation of .htaccess and it gets overwritten each time you publish. I also noticed while checking things out that my hosting service requires the extension to be .shtml for the error pages. Possibly each hosting service has their own little quirks about some of this. So, let me finish by saying (again) that I've always just used the control panel. Mine looks somewhat different than the above screenshots, but the same basic idea. I have just made my page and then just copied/pasted the html into the window that appears. I do make absolute references to images so that the custom error page works with any directory in the site. Hope this helps in some fashion. Nancy
_____________________________
Easy Estimates -- is a simple to use tool to quickly build a Web site page enabling visitors to quickly and easily create an estimate of the cost of services that you provide.
|
|
|
|
BobbyDouglas
Posts: 5470 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Custom error pages & .htaccess problem - 7/11/2004 18:23:30
This is what is in my .htaccess: ErrorDocument 403 /errorpgs/403.php ErrorDocument 401 /errorpgs/401.php ErrorDocument 500 /errorpgs/500.php ErrorDocument 400 /errorpgs/400.php ErrorDocument 404 /errorpgs/404.php Note that all of my error pages are inside of the directory errorpgs. Try putting your different error docs inside of the errorpgs folder. When you find out what is stopping you from using the "normal code", (most likely something similar to what Nancy was saying about how her host only allows .shtml error docs) then ask why it is setup like that. Do you have the link to the tutorial on this? If you want to get fancy with the error pages, check out my Error page Generator.
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
BobbyDouglas
Posts: 5470 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Custom error pages & .htaccess problem - 7/11/2004 19:18:54
Just to clarify (it didn't sound like you knew this but..) The format for the error docs in .htacces is: ErrorDocument followed by the Error #, and then the location of the error page with a space inbetween each section, is how you setup the error page in .htaccess. Meaning: [B]ErrorDocument[/B] [SPACE] [B]Error #[/B] [SPACE] [B]Location of error page, with a forward slash / in front of the folder[/B] You cannot change the word ErrorDocument, but everything else is whatever you want it to be. Did you try to place the files in /errorpgs/ and then name them to 400.html 401.html, ect? Also, remove the line " # Added for Custom Errors " since it is not needed.
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
abbeyvet
Posts: 5095 From: Kilkenny Ireland Status: offline
|
RE: Custom error pages & .htaccess problem - 7/11/2004 19:57:51
quote:
ErrorDocument 401 /errors/error401.htm ErrorDocument 404 /errors/error404.htm ErrorDocument 500 /errors/error500.htm This assumes that the error pages are in a directory called "errors". If they are in your root directory, it would be: ErrorDocument 401 error401.htm ErrorDocument 404 error404.htm ErrorDocument 500 error500.htm quote:
It has been my understanding that: 1. if you have FP extensions installed, and if you publish your site using FP's publish feature, you likely will not be able to create and use your own .htaccess file. Not so on my servers anyway (and thus on Gail's!), and the extension can be anything you like. You just need not to remove anything that is already in it, so append anything extra below the stuff already there. Since other servers may be configured differently, this may not be universally true - best check with your host.
_____________________________
Katherine :: InKK Design :: InKK Domains
|
|
|
|
_gail
Posts: 2876 From: So FL Status: offline
|
RE: Custom error pages & .htaccess problem - 7/12/2004 7:45:39
Thanks for checking, but I don't get it. One sees a custom error page and the other doesn't?! Yet I can't use the htaccess file I created (still shuts down the site) so I replaced mine with the original. Man, I truly hate this stuff!! Sorry for venting, but it's been a very frustrating series of web weeks!! gail
_____________________________
Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography
|
|
|
|
Giomanach
Posts: 6128 Joined: 11/19/2003 From: England Status: offline
|
RE: Custom error pages & .htaccess problem - 7/12/2004 7:57:44
Gail, Katherine Seeing as your both on the same servers, I take it both of you will be using the same/similar packages? Katherine - Do you have custom error pages, I keep on going to your web to try and I get "Coming Soon" Message, so i can't fidn out whether you have them or not. Gail - If you look at the link Bobby looked at, he tried to get error400.htm from the root of your web, whereas I took it from the sub directory of /errors/ And just as a thought, have you got the .htaccess doding anything else? Or is is just for the error pages? I haven't set up any for mine, so I may just do so and see If I get an error Dan
_____________________________
|
|
|
|
Giomanach
Posts: 6128 Joined: 11/19/2003 From: England Status: offline
|
RE: Custom error pages & .htaccess problem - 7/12/2004 8:17:43
quote:
# -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName www.digicamhelp.com AuthUserFile /home/sites/www.digicamhelp.com/web/_vti_pvt/service.pwd AuthGroupFile /home/sites/www.digicamhelp.com/web/_vti_pvt/service.grp ErrorDocument 400 error400.htm ErrorDocument 401 error401.htm ErrorDocument 403 error403.htm ErrorDocument 404 error404.htm ErrorDocument 500 error500.htm Quoted from your posted up thar ^^^^^ This one shows the error files as being in the root directory, not in /errors/. I can only see it setting Custom Error pages...and setting the FP access permissions, nothing else. Take you mind off of thinkgs for now....go play Mini Golf.....You need a break from this. If not, try this one for the .htaccess: quote:
# -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName www.digicamhelp.com AuthUserFile /home/sites/www.digicamhelp.com/web/_vti_pvt/service.pwd AuthGroupFile /home/sites/www.digicamhelp.com/web/_vti_pvt/service.grp ErrorDocument 400 /errors/error400.htm ErrorDocument 401 /errors/error401.htm ErrorDocument 403 /errors/error403.htm ErrorDocument 404 /errors/error404.htm ErrorDocument 500 /errors/error500.htm Bit in bold controls FP access, bit in Italics should control CEP Dan
_____________________________
|
|
|
|
Giomanach
Posts: 6128 Joined: 11/19/2003 From: England Status: offline
|
RE: Custom error pages & .htaccess problem - 7/12/2004 8:46:19
Let me try on my web host tonight, I don't have a CPanel so .htaccess is the only way Dan
_____________________________
|
|
|
|
Giomanach
Posts: 6128 Joined: 11/19/2003 From: England Status: offline
|
RE: Custom error pages & .htaccess problem - 7/12/2004 9:16:36
I don't have FPSE installed on my host, whereas you do, I can tell from the htaccess file. What I will do when I get home is create some CEPs for my web, a small PHP login program, create the htaccess file as per the tut, and see what happens. Just as a warning, I may ask for FTP login details, so I can see what's going on behind the scenes on your web. I won't do anything I shouldn't, it's just so I can see if there's any FP components preventing it from working. Dan
_____________________________
|
|
|
|
Giomanach
Posts: 6128 Joined: 11/19/2003 From: England Status: offline
|
RE: Custom error pages & .htaccess problem - 7/12/2004 11:01:32
There you go Gail, get the FPSE uninstalled, and then try. If it still doesn't work, I'll see what I can do Dan
_____________________________
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|