Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   About the 404.php page (http://forum.bytesforall.com/showthread.php?t=11955)

Farinet Dec 31, 2010 05:04 AM

About the 404.php page
 
Hello,

At the moment wrong URLs get me a
Not Found

The requested URL /sd was not found on this server.
page. I am not sure who is generating this page, but I would guess it is Apache.
I have read that, in order to have a custom Not Found page, one needs to create, in the Atahualpa theme directory, a 404.php page with

<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<h2 class="center">ARBITRARY TEXT</h2>
<p>MORE ARBITRARY TEXT</p>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>


I did, however I still get the page above.

Note that I don't have an .htaccess file. Should I create one manually and edit it? I assumed WP would take care of this.

juggledad Dec 31, 2010 06:19 AM

make a copy of index.php and rename it to 404.php and edit it

Farinet Dec 31, 2010 08:04 AM

Thanks for your input, however this doesn't solve my problem. I made a copy of index.php and renamed it to 404.php. However I am still in the situation described above and still get the (presumably) Apache-generated message. Of course I can create a .htaccess, and point 404 errors to a particular page created for this. Please clarify if I am supposed to do this, or if it should work by just adding the 404.php file. If one has to create the .htaccess file, then the "not found" page is set there, and can have any name. So, from the fact that it should be named 404.php, I assumed WordPress should somehow take care of this by itself. Apparently I am missing something.

juggledad Dec 31, 2010 01:49 PM

You might want to look at the No 404 Errors plugin. I will let you redirect to a page of your choice
see also http://codex.wordpress.org/Creating_an_Error_404_Page

Farinet Jan 1, 2011 09:56 AM

I tried the plugin, but my situation is still the same.

Regarding the Codex page, it says:

Quote:

The default WordPress theme has a 404.php file, but not all Themes have their own custom 404 error template file. If they do, it will be named 404.php. WordPress will automatically use that page if a Page Not Found error occurs.
However this not the case. I have created such a file in the theme root directory, and it is not used at all.

The rest of the page is irrelevant, as it explains what the content of 404.php should be.

Just wondering: what about the .htaccess file? Should there be one? Could it be the case that WP usually maintains its own .htaccess file for such things, but in my case it couldn't create it?

vCopia Feb 26, 2011 01:21 PM

Quote:

Originally Posted by juggledad (Post 53322)
You might want to look at the No 404 Errors plugin. I will let you redirect to a page of your choice
see also http://codex.wordpress.org/Creating_an_Error_404_Page


Just wanted to say a hearty Thanks, The No 404 Errors plugin was just what I was looking for.


All times are GMT -6. The time now is 12:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.