[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4417: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression'
Astro Loco • Error Page Handler not Working

It is currently Thu 14 Dec, 2017 9:02 am • View unanswered postsView active topics

Error Page Handler not Working


Error Page Handler not Working

Postby qazxsw21000 » Sat 29 Dec, 2012 7:13 pm

I have set up the basic error pages for my site; 400, 401, 403, 404, and 500. But I got to noticing, I see the error pages in my web root directory and I can view them if I type them into the address bar. However, if I mistype a directory, I see a page telling me the requested page does not exist and that no error document was found to handle the error. Here's some screenshots:
Image
Image
"Analogies are like sandwiches in that I'm making one now."
Does a set of all sets contain itself?
This statement is false!
Your next task: Refuse this task
User avatar
qazxsw21000
 
Posts: 1500
Images: 18
Joined: Sat 06 Aug, 2011 10:37 pm
Location: London, KY

Re: Error Page Handler not Working

Postby anwiii » Sat 29 Dec, 2012 7:44 pm

i think you need to edit your .htaccess file or create a new one if you don't have one. just add a line like, "ErrorDocument 401 /filename.ext" without the quotes. also substitute filename.ext with the file you want the 401 error page to be.
User avatar
anwiii
Site Admin
Site Admin
 
Posts: 1435
Images: 1
Joined: Thu 23 Jun, 2011 11:21 am
Location: chilhowee, mo

Re: Error Page Handler not Working

Postby qazxsw21000 » Sat 29 Dec, 2012 10:52 pm

I've tried this the following codes, each on it's own line:
Code: Select all
ErrorDocument 404 "404.shtml"
ErrorDocument 404 /home/muknot/public_html/404.shtml
ErrorDocument 404 "/home/muknot/public_html/404.shtml"
ErrorDocument 404 404.shtml


The first and last codes cause "404.shtml" to echo to the screen. The second and third cause the same thing to happen as before. If I use "/404.shtml", it echoes the slash to the screen too.
"Analogies are like sandwiches in that I'm making one now."
Does a set of all sets contain itself?
This statement is false!
Your next task: Refuse this task
User avatar
qazxsw21000
 
Posts: 1500
Images: 18
Joined: Sat 06 Aug, 2011 10:37 pm
Location: London, KY

Re: Error Page Handler not Working

Postby anwiii » Sun 30 Dec, 2012 10:16 am

i got in to your htaccess file and decided to edit the 404 line. hope you didn't mind. follow that example for your other error codes. it's working as i suggested in my above example. the 4 codes you tried are all incorrect. the last one is almost correct except it's missing the forward slash. hope this helps.....

on a side note, on the 404 error page, you are wanting to redirect them to a home.php page that doesn't exist so they are going to get the same 404 error message. i think you meant to direct them to your /index.php page.
User avatar
anwiii
Site Admin
Site Admin
 
Posts: 1435
Images: 1
Joined: Thu 23 Jun, 2011 11:21 am
Location: chilhowee, mo

Re: Error Page Handler not Working

Postby qazxsw21000 » Sun 30 Dec, 2012 4:42 pm

Yeah I meant index.php. I will have to look later, though. I'm on my iPod right now; iPods are 't the best things for website administration.

*EDIT*
Just looked. I changed the other lines to reflect the 404 line, with appropriate changes. I also fixed the link to point at index.php instead of home.php. Thanks, anwiii. I would have never figured that one out.
"Analogies are like sandwiches in that I'm making one now."
Does a set of all sets contain itself?
This statement is false!
Your next task: Refuse this task
User avatar
qazxsw21000
 
Posts: 1500
Images: 18
Joined: Sat 06 Aug, 2011 10:37 pm
Location: London, KY



  • Advertisement

Return to Support & Feedback

Who is online

Users browsing this forum: No registered users and 0 guests

cron