navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Custom error pages & .htaccess problem

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Custom error pages & .htaccess problem
Page: [1] 2   next >   >>
 
_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

_____________________________




(in reply to _gail)
_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

(in reply to Giomanach)
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

_____________________________




(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/11/2004 16:44:24   
That'd be great.

My host uses Linux, and the tutorial address that as to uploading, so I'm okay. I think I'm just not getting it right with the code.

gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to Giomanach)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/11/2004 16:54:58   
Basically, what I do is, login into the clients account, and then hit domains, select the domain I';m working on, and then I find the Custom Error Pages image link. This gives me:


Thumbnail Image
:)

From there I just click on the error page I want to change, and it gives me (see next post)

Attachment (1)

_____________________________




(in reply to _gail)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/11/2004 16:58:02   

Thumbnail Image
:)
I just enter location of the new one, and bobs your uncle, it's done

Where that's all located depends on your hosts choice of programs for it etc, but the ethics should be the same

Dan

Attachment (1)

_____________________________




(in reply to Giomanach)
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.

(in reply to Giomanach)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/11/2004 17:52:30   
I don't think I can do this in my control panel. At least I didn't see any place.

I'll contact my host which is, er, Katherine. :)

Thanks everyone!

When I find out, I'll let you know so perhaps it can benefit others, particularly if there is more than one way to accomplish this.

gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to Nancy)
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

(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/11/2004 18:29:54   
quote:

Do you have the link to the tutorial on this?


http://www.outfront.net/tutorials_02/adv_tech/customerrors1.htm

Thanks, I'll check out your link.

I've emailed Katherine and will no doubt hear from her in the next day or two.

At least I backed up the original .htaccess file. :)

gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to BobbyDouglas)
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

(in reply to _gail)
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

(in reply to BobbyDouglas)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/11/2004 21:08:48   
quote:

If they are in your root directory, it would be:


My errors folder and .htm files are shown in the attachment below.

Here's the .htaccess file code:

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


Here's what I get trying to visit my site after I ftp the .htaccess file.

quote:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@www.digicamhelp.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

--------------------------------------------------------------------------------

Apache/1.3.27 Server at www.digicamhelp.com Port 80


:):)


Thumbnail Image
:)

Attachment (1)

< Message edited by _gail -- 7/11/2004 21:18:43 >


_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to abbeyvet)
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 3:05:48   
http://www.digicamhelp.com/error400.htm does not display your error page.

Btw, do you have any type of Control Panel? If so, which one?

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to _gail)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 3:22:46   
Nope, but this does:

http://www.digicamhelp.com/errors/error400.htm

_____________________________




(in reply to BobbyDouglas)
_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

(in reply to Giomanach)
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

_____________________________




(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 8:11:35   
quote:

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 have that page. Here's the set-up:

:)

Don't understand what you mean about the .htaccess doing anything else. I listed the code above for the .htaccess file. There is nothing else in it than what I showed.

My code and set-up are correct, are they not?

thanks, gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to Giomanach)
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

_____________________________




(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 8:41:28   
quote:

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


Tried this too, which is what I had in the first place. My site shuts down! :)

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to Giomanach)
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

_____________________________




(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 8:50:39   
You're a sweetheart. Thanks for your efforts.

btw, my code IS right, isn't it?!? If so, then the problem is elsewhere.

gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to Giomanach)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 8:58:51   
I've got Dummies Guide to htaccess here (sad I know) and I'm just rehashing my skills on it as it were. Your coding is perfect. Don't worry, I've nearly scratched a hole in my scalp over this one.

WIll get back to you ASAP....it may just be the clash between FPSE and htaccess. How much do you rely on FPSE? May need to take a different tact is you rely on them heavily, as the htaccess file sets the access permissions as well. Maybe a clash.

Let me see what my host makes of it, and i'll get back to you:)

Go take a break, work on something else.

Just beneath my skin.....I'm screaming:)

_____________________________




(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 9:13:02   
quote:

How much do you rely on FPSE?


That I recall, I don't use any.

Wish I could still scream. Don't have any voice left. :)

Seriously, this seems like it should be so simple. If I have it coded right, with everything else placed correctly, then I'm perplexed.

gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to Giomanach)
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

_____________________________




(in reply to _gail)
abbeyvet

 

Posts: 5095
From: Kilkenny Ireland
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 10:56:02   
quote:

Seeing as your both on the same servers, I take it both of you will be using the same/similar packages?


I own the servers that Gail is hosted on. Normally I would just reply to her by email, but since it is here I may as well keep it going here. :)

As it happens I was wrong and Nancy was right.

I was assuming that since FP sites could use .htaccess to password protect directories on this particular server, as they can, that the same would apply to other .htaccess functions like error pages. Turns out I was wrong on that, and if you are using extensions you cannot have custom error pages using .htaccess.

However I am looking at getting things configured so that it is possible to do it another way.

quote:

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.


That whole site is a big error at the moment :) :) - its a case of having time to get it sorted and the picture on the holding page just about says it all really.

I use custom errors all over the place on loads of sites, but I don't use FP extensions, so it's not really relevant here.

_____________________________

Katherine

:: InKK Design :: InKK Domains

(in reply to Giomanach)
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

_____________________________




(in reply to abbeyvet)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 11:27:49   
quote:

ORIGINAL: abbeyvet
I own the servers that Gail is hosted on. Normally I would just reply to her by email, but since it is here I may as well keep it going here. :)


Good idea, since others may face the same problem.

quote:

I am looking at getting things configured so that it is possible to do it another way.


Good, too. I'll wait.:)

gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to abbeyvet)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Custom error pages & .htaccess problem - 7/12/2004 11:33:13   
quote:

ORIGINAL: Giomanach
There you go Gail, get the FPSE uninstalled, and then try. If it still doesn't work, I'll see what I can do


I've never worked with FPSE not installed. What are the ramifications if I uninstall them?

My site is now over 300 pages now and growing. I don't want to mess up anything. I do have a FrontPage photogallery or two in the site but, other than that, I don't recall using other web components....then again, my memory ain't what it used to be. :)

gail

_____________________________

Digicamhelp - Easiest place on the web to learn about Digit@l Cameras & Photography

(in reply to Giomanach)
Page:   [1] 2   next >   >>

All Forums >> Web Development >> General Web Development >> Custom error pages & .htaccess problem
Page: [1] 2   next >   >>
Jump to: 1





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