Custom 404.php?

Status
Not open for further replies.

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Yes, if you log in to cpanel, and scroll down the list of actions to the very bottom under the advanced category, you'll see Custom Error Pages and a traffic cone.

-Click it and then you can select which error you'd like to customize.
-If you already have designed a page, you need to open it in some sort of text editor, and copy and paste the code into the box.

And now you should have a custom error page.

Hope this helps :)
 

felabria

New Member
Messages
88
Reaction score
0
Points
0
Hmm... getting confused. How do i use 404.php in the 404.shtml? i would like to 404 .shtml link to 404.php
Wordpress uses php to ONLY get a permalink linking to 404.php error. But when wordpress does not know the permalink 404 error will get to the X10host 404 error. BUT i want to link it to 404.php

P.S. do not close yet
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Not applicable.
 
Last edited:

techairlines

x10 Flyer
Community Support
Messages
2,867
Reaction score
165
Points
63
Hmmm see this about Wordpress 404: http://codex.wordpress.org/Creating_an_Error_404_Page

If I'm not mistaken, the Wordpress Permalink Rewrite Rules prevent Custom Error Pages from working because Wordpress already has a built in Error page (theme's 404.php). The ErrorDocument and RewriteRules .htaccess lines conflict each other.
 

adamparkzer

On Extended Leave
Messages
3,745
Reaction score
81
Points
0
Go into your .htaccess page in your Wordpress folder and add the following line:

ErrorDocument 404 /404.php
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Or if you didn't want to play with .htaccess you could use an iframe.
 

ah-blabla

New Member
Messages
375
Reaction score
7
Points
0
Hmmm see this about Wordpress 404: http://codex.wordpress.org/Creating_an_Error_404_Page

If I'm not mistaken, the Wordpress Permalink Rewrite Rules prevent Custom Error Pages from working because Wordpress already has a built in Error page (theme's 404.php). The ErrorDocument and RewriteRules .htaccess lines conflict each other.
This is the best guide as to how to do it. The way the .htaccess file works is that any requests to non-existant files are redirected to WP (this includes all you WP pages, since they don't exist as physical files, rather as data in a db), so you have to tell WP what to do when it gets a request for a non existant page, which this does. (The server doesn't know what is a valid WP page and what isn't, it simply passes the requested address on to WP to decide what to do.)

//Edit: wait a minute, how did the topic get onto WP? However, the above info is valid for almost all CMSs, they will each deal with 404 slightly differently, so each needs a separate guide.

If you aren't using WP or similar then use the .htaccess method as outlined by adamparkzer
 
Last edited:
Status
Not open for further replies.
Top