Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Not sure if this strictly wordpress and not a general apache configuration but I'm having trouble setting up my 404 page for a custom theme.

I have my 404.php in the same directory as my index.php.

I had this working kind of working earlier by adding ErrorDocument 404 with an explicit path to 404.php, but wordpress wasn't being included on the page. I've now removed that line.

My .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

My apache enabled site:

<VirtualHost *:80>
        ServerAdmin info@seoplay.co.uk
        ServerName www.lart.co.uk
        ServerAlias lart.co.uk
        DocumentRoot /var/www/lart.co.uk
        <Directory /var/www/lart.co.uk>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride FileInfo
                DirectoryIndex index.php
                Order allow,deny
                allow from all
        </Directory>
         ..... etc

This is on a local machine.

I'm not sure how to make wordpress know about my custom 404 page.

share|improve this question
    
Does the 404.php work if you switch to a bundled theme like "Twenty Fourteen"? –  s_ha_dum Mar 16 at 21:47
    
@s_ha_dum thanks. Nope, it doesn't work with other themes either. –  UzumakiDev Mar 16 at 21:56
    
@s_ha_dum I've disabled all plugins too. –  UzumakiDev Mar 16 at 22:07
    
What is the redirect sequence? Watch the page load via something like HttpFox. –  s_ha_dum Mar 16 at 22:09
    
@s_ha_dum just gave it a go, it gave me a 301 permanently moved, then a 200 ok response. –  UzumakiDev Mar 16 at 22:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.