WordPress 403 and 404 errors, but not on homepage - why?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

WordPress 403 and 404 errors, but not on homepage - why?

Post by simonmlewis »

Hi

An associate's web site has a problem.
It's 100% WordPress. Homepage is fine.
But every single secondary page has a 404 error, and wp-admin is a 403 error.
Their htaccess files looks fine to me.

The only thing I noticed was the name of htaccess, it was sent as htaccess.dat, but I'm not certain if they renamed it to that before sending over.

Apart from HTACCESS, is there anything obvious that can cause this kind of WP error? I'm getting a little stuck..........
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: WordPress 403 and 404 errors, but not on homepage - why?

Post by Celauran »

403 is forbidden, so I'd check the directory permissions, htaccess rules (assuming it's actually .htaccess and not htaccess.dat), and virtual host configuration. If his .htaccess isn't actually called .htaccess, then everything's going to 404 for sure. Could also just be a question of resetting the permalinks in WP.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: WordPress 403 and 404 errors, but not on homepage - why?

Post by simonmlewis »

I did wonder about permalinks. But how do u change if WP-admin is 403?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: WordPress 403 and 404 errors, but not on homepage - why?

Post by Celauran »

Because wp-admin is a directory, it's likely not being caught by the .htaccess rules, if they're even in effect. Check that the web server has execute access to that directory, read access to the index.php inside it, and check that Indexes option is enabled in the virtual host.
Post Reply