Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome, Guest. Please login or register.
Did you miss your activation email?

July 15, 2020, 06:32:39 AM

Login with username, password and session length
  • Total Members: 3786
  • Latest: Deaks
  • Total Posts: 190444
  • Total Topics: 20857
  • Online Today: 76
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 0
Guests: 47
Total: 47

Author Topic: [Tip] Create a 404 Not Found Page  (Read 23597 times)

0 Members and 1 Guest are viewing this topic.

Offline IchBin

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: [Tip] Create a 404 Not Found Page
« Reply #30 on: May 11, 2010, 09:38:40 AM »
Did you look at your server logs? Not much we can do on this end without looking at the stuff on your server and in your configuration. If you can't see anything, I'd ask your host.

Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Re: [Tip] Create a 404 Not Found Page
« Reply #31 on: May 11, 2010, 10:28:59 AM »
You can make those in your cPanel , or i can..
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes

Offline Ken.

  • Support Team
  • *
  • Posts: 4352
    • Our FamilyForum
Re: [Tip] Create a 404 Not Found Page
« Reply #32 on: July 13, 2016, 04:59:04 PM »
... it's always a good policy to check back on 'custom codes' like this one.
My custom 404 page stopped showing so while checking on why it turns out that at some point the .htaccess file was overwritten by an SMF update. Doing the code insertion resolved the issue, so it's all better now.
You can see my page HERE if you wish.

While sorting out this issue I was reminded of the following tip that I picked up on back in 2014.
I posted on the Google 'Webmaster' support forums and was told that my code was wrong and should be as follows:

Hi Ken,

No, that's not correct. You should have this:

ErrorDocument 404 /FamilyForum/index.php?page=208

(You're mixing up a 301 redirect with the ErrorDocument directive.)

Also you must not include the full URL in an ErrorDocument directive or you won't get the all-important 404 status code: it will do a 302 redirect instead (which is what it does right now), which will screw your site up.

Modify as I've suggested and then check the HTTP headers to ensure it's sending a 404 code as well as serving up the 404 page:

Check the headers with one of these tools...
Live http headers (a Firefox browser addon_: https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/
Rex Swain's http viewer: http://www.rexswain.com/httpview.html
Web sniffer: http://web-sniffer.net/

After making the change to my .htaccess file the error page call works as it should. (the support helper had me run a check to see how Google was reading the page call)
You can find the support topic at this link...

" If everything seems under control, you

Offline Ken.

  • Support Team
  • *
  • Posts: 4352
    • Our FamilyForum
Re: [Tip] Create a 404 Not Found Page
« Reply #33 on: July 15, 2016, 10:48:48 AM »
An interesting error is now (sometimes) popping up when logging in... when you click to log in the custom 404 error page displays. If you then click on any of the buttons in the top navigation bar the forum them behaves as expected.

Any thoughts?
We began a discussion about the issue HERE.

" If everything seems under control, you