Where to Edit 404 Error Code?

Started by Martinfin, July 03, 2010, 08:01:11 AM

Previous topic - Next topic

Martinfin

The requested URL /forum/test.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


The above is an example of what I am trying to  edit...

How to make it say something like, "The page you requested is not found!" and maybe add more to spruce it up??


Thanks!
-> Martinfin

xenovanis

This is not an SMF page, right? You should be able to edit errorpages from your servers controlpanel.

Also, take a look at this tutorial
http://www.webweaver.nu/html-tips/custom-404.shtml

or search the internet for "edit 404 page"  ;)
"Insanity: doing the same thing over and over again and expecting different results."

Martinfin

Quote from: xenovanis on July 03, 2010, 08:25:01 AM
This is not an SMF page, right? You should be able to edit errorpages from your servers controlpanel.

Also, take a look at this tutorial
http://www.webweaver.nu/html-tips/custom-404.shtml

or search the internet for "edit 404 page"  ;)

Actually yes, I am operating my site using SMF... I will look into this with the control panel and get back to you on this.

Thanks!
-> Martinfin

xenovanis

Umm, I guessed you were using SMF since you posted it here. I meant creating 404 pages is not a default feature of SMF.  ;)
"Insanity: doing the same thing over and over again and expecting different results."

Mick.

Are you using pretty URL mod?


Anyways,.....   if you created that page,  test.php

Make sure you have this in it:


<?php require("/home/******/public_html/forum/SSI.php"); 
$context['page_title_html_safe'] = 'Test';
template_header(); 

echo
'

YOUR CONTENT GOES HERE '
;

template_footer(); ?>



It can be accessed via yoursite.com/forum/test.php

xenovanis

Quote from: bluedevil on July 03, 2010, 02:50:17 PM
Are you using pretty URL mod?


Anyways,.....   if you created that page,  test.php

Make sure you have this in it:


<?php require("/home/******/public_html/forum/SSI.php"); 
$context['page_title_html_safe'] = 'Test';
template_header(); 

echo
'

YOUR CONTENT GOES HERE '
;

template_footer(); ?>



It can be accessed via yoursite.com/forum/test.php

You lost me there  ???

"Insanity: doing the same thing over and over again and expecting different results."

Martinfin

Quote from: xenovanis on July 03, 2010, 02:46:20 PM
Umm, I guessed you were using SMF since you posted it here. I meant creating 404 pages is not a default feature of SMF.  ;)

I see that now. I used the CP and its generic for my host but it works now, but I'll look into others ways of making a better 404 page not found....

Thanks for your help.

Quote from: bluedevil on July 03, 2010, 02:50:17 PM
Are you using pretty URL mod?


Anyways,.....   if you created that page,  test.php

Make sure you have this in it:


<?php require("/home/******/public_html/forum/SSI.php"); 
$context['page_title_html_safe'] = 'Test';
template_header(); 

echo
'

YOUR CONTENT GOES HERE '
;

template_footer(); ?>



It can be accessed via yoursite.com/forum/test.php

No, Sorry I might have confused you on this... Both of you have been helpful.

Thanks again!!!
-> Martinfin

Mick.

I thought you where wanting to have a 404 not found page for smf.   The code above would work when adding your own 404 codes to it and editing the .htaccess


Something like this:

http://www.bluedevilcustoms.com/index.php/page,page585.html

xenovanis

Ooh, very nice. I see now, didn't even think of that.

(I seriously thought you were replying to a wrong topic   :-[)
"Insanity: doing the same thing over and over again and expecting different results."

Mick.

Quote from: xenovanis on July 03, 2010, 03:18:29 PM
Ooh, very nice. I see now, didn't even think of that.

(I seriously thought you were replying to a wrong topic   :-[)


lol.... i mightve given the wrong reply tho'.   ....but i thought that what's he wanted.   I think im going to make this into a mod if its not already available ;)

Martinfin

Quote from: bluedevil on July 03, 2010, 03:15:19 PM
I thought you where wanting to have a 404 not found page for smf.   The code above would work when adding your own 404 codes to it and editing the .htaccess


Something like this:

http://www.bluedevilcustoms.com/index.php/page,page585.html

I am.. Sorry.. Not too bright at this stuff yet... Exactly what I was wanting... I will now try the code.

-> Martinfin

kat

Do a Google for 404 messages.

There are some brilliant ones. ;)

Advertisement: