views:

166

answers:

3

I have built a few themes and noticed that the 404 pages, once uploaded to my server. never appear. They always do on my localhost setup, and even themes for others have worked.

I see no reason for it not to work, I have mod_rewrite enabled for the pretty permalinks but the 404 redirection seems not to want to work.

Is this a known issue?

Is it my shitty server with Streamline.net?

Can anyone help?

+1  A: 

You can try setting your own error documents in .htaccess and that may override your hosts settings and that point to a static wordpress page called "error" or your 404.php in your theme

ErrorDocument 401 http://mydomain.com/error/
ErrorDocument 403 http://mydomain.com/error/
ErrorDocument 404 http://mydomain.com/error/
ErrorDocument 500 http://mydomain.com/error/

Edit: You can also do a redirect in your theme's 404.php file (yes, it's ugly...) to your static error page: <?php Header("Location: http://mydomain.com/error/"); ?>

If that doesnt work, I don't know.

songdogtech
Have tried this in the .htaccess wordpress creates in the root directory and also tried setting up a .htaccess in the theme directory with this code - all to no avail unfortunately.
DanC
I edited my answer for another possibility....
songdogtech
The redirect seems to work, many thanks. I'm still at a loss to explain why the 404 template is able to redirect but not to display itself. Very strange but this fix will cover me! Cheers!
DanC
A: 

Hi,

Suffering from the same issue with Streamline. I guess it's due to the apache version used by this hosting 1.3.

migele
A: 

It's rather bizarre that this is happening. If WordPress is working with pretty permalinks, then Apache is doing it's job - rewriting any URL that doesn't physically exist to WordPress.

It's then up to WP to decide if the request doesn't match anything, and if so, display a 404.

Perhaps Streamline is screwing this up, by reading the '404 Not Found' header that WP kicks out and fiddling with the output?

TheDeadMedic