News: Welcome to the TinyPortal Support site.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

August 21, 2019, 06:44:20 PM

Login with username, password and session length

Recent

Members
  • Total Members: 3751
  • Latest: tom888
Stats
  • Total Posts: 188690
  • Total Topics: 20745
  • Online Today: 102
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 60
Total: 60

Author Topic: [Tip] Create a 404 Not Found Page  (Read 20252 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: 4344
    • Our FamilyForum
Re: [Tip] Create a 404 Not Found Page
« Reply #32 on: July 13, 2016, 04:59:04 PM »
Update:
... 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.
  O0
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:

Quote
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...
https://productforums.google.com/forum/#!msg/webmasters/8KmJGnTDl4s/bwj4E9U4d-gJ

----------------------------------------------------
" If everything seems under control, you’re not going fast enough." - Mario Andretti  ^-^

Offline Ken.

  • Support Team
  • *
  • Posts: 4344
    • 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’re not going fast enough." - Mario Andretti  ^-^