Back in 2010 we had a custom error page set up (http://www.ourfamilyforum.org/FamilyForum/index.php?topic=2340.0) that worked very nicely... not any more though.
The page is still in our TP Articles inventory, located HERE (http://www.ourfamilyforum.org/FamilyForum/index.php?page=208), but so far I'm not getting it to work for a 404 error. Over on tinyportal.net there are a couple of old topics on the subject but the info there seems to be out of date.
Any ideas?
I have never tried to use an article for a 404 page. However, I suppose you could create one using TP and maybe just copy the code to 404.html?
There is an SMF Mod, 'Apache Error Handler (http://custom.simplemachines.org/mods/index.php?mod=1363)' that works and gives the 404 error page enclosed in the forum's default theme and the header, or top navigation bar. While the resulting output of the Mod works as expected it just leaves something to be desired in the way it looks.
I think that it can be edited, but still need to explore that possibility.
Fixed it! :hah!:
I was using bad code in the '.htaccess' document.
Once the correct code was added to the file it works great. (it's the last line in the code below.)
You can give it a test by clicking this link
www.ourfamilyforum.org/FamilyForu
RewriteOptions inherit
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "http\:\/\/www\.ourfamilyforum\.org\/FamilyForum\/index\.php" [R=301,L]
RewriteCond %{HTTP_HOST} ^ourfamilyforum\.org$ [OR]
RewriteCond %{HTTP_HOST} ^www\.ourfamilyforum\.org$
RewriteRule ^/?$ "http\:\/\/www\.ourfamilyforum\.org\/FamilyForum\/index\.php" [R=301,L]
ErrorDocument 404 http://www.ourfamilyforum.org/FamilyForum/index.php?page=208
Good job and GREAT error page!!! I remember those commercials! LOL
What does this part mean?
[R=301,L]
Good job and GREAT error page!!! I remember those commercials! LOL
What does this part mean?
[R=301,L]
Thanks Steve. :happy1:
On the [R=301,L] I'm not sure but I think that it's related to our forum name redirects... if someone types in a variation of the forum name it will still go to the site because of the redirects.
For example, type "ourfamilyforum.org" into your browser address bar and it will return/redirect to http://www.ourfamilyforum.org/FamilyForum/index.php
But... you have me curious now so me gonna have to do some research to verify the answer! :hah!:
I was asking because I was going to use the code on my forum and wanted to be sure and see if I needed to change that part to point to a specific page or something.
I didn't change any of the code that was already in the '.htaccess' file... just added the code string for the 404 page address.
ErrorDocument 404 http://www.ourfamilyforum.org/FamilyForum/index.php?page=208
Ok, thanks, bro. :)
Just need to figure out how I want it to look.
:2cool!!
Shoot me a link when you get it up.
@Skhilled
Steve, this information may be needed for you to correctly set your 404 redirect.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...
https://productforums.google.com/forum/#!msg/webmasters/8KmJGnTDl4s/bwj4E9U4d-gJ
Cool! Thanks, bro! Bookmarked it as it has some other info I'd like to read up on. :)
Wait...so what the code from above be now?
Nvm, found the how-to. :rofl2
:thumbup:
Found this image but have not added the right text yet:
http://skhilled.net/smf/index.php?page=50
...since it is a food forum. Was the only one I liked so far.
Good one! :hah!:
I like it.
Nice one Steve !!! The only thing I would consider doing is maybe centering the image in the article. Otherwise, :thumbup: :thumbup: :thumbup:
I had Les enlarge it for me so now it is bigger but still need to add the text.
Whoops!!!Just fixing the error page, but...
Forgot about this part:Hi Ken,
No, that's not correct. You should have this:
ErrorDocument 404 /FamilyForum/index.php?page=208
@Skhilled
Steve, this information may be needed for you to correctly set your 404 redirect.
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...
https://productforums.google.com/forum/#!msg/webmasters/8KmJGnTDl4s/bwj4E9U4d-gJ
(https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-090116134748.jpeg)
Resurrecting this old topic because I just discovered that our
super cool 404 error page was not being called up on page errors! shocked003
Needed the code added back into the .htaccess... fixed now. :tick:
https://www.ourfamilyforum.org/FamilyForum/index.php?page=208
Cool, but now it shows up when you login. LOL
Me don't know how to fix that. :-\
I just logged in and it didn't show up this time. Go figure...
EDIT: I just logged out and back in but this time I used the TP block to login and it did it.
Just did it again to me using the login in the main menu...
shocked028I have fixed this to the standard 404 page:
https://www.ourfamilyforum.org/FamilyForum/404.shtml
I've commented out the .htaccess line to the TP article. I think there may be a TP issue with it running from within .htaccess.
Good deal. :thumbup:
The new 404 page will need some navigation links added in... me can do that. laughing7
EDIT: ... after the NASCAR race that just started!
LOL, I just realized that myself while sitting here cooking and playing a game.