Wordpress - 404 error on home page

Posted on 2012-09-05
Medium Priority
Last Modified: 2012-09-06
Wordpress installation returns a 404 error instead of the correct Blog home page.

It worked fine until the root directory .htaccess was hacked.  (I've had a lot of trouble with this on all my sites.)

Simultaneously, the Wordpress theme was updated.

I'm not sure which caused the 404 problem.

This is the problem.

Root web page directory is:

Open in new window

Blog is at:

Open in new window

Wordpress is dropping the /blog/ directory, i.e.,
if I want to go to the Blog Contact PAGE
Wordpress is returning

Open in new window

instead of the correct

Open in new window

Please see attached file for General Wordpress Settings.

Appreciate your help in advance.

Question by:aprillougheed
  • 3
  • 3
LVL 30

Expert Comment

ID: 38372081
When you say the .htaccess was "hacked" what do you mean exactly?

Author Comment

ID: 38372300
Code that sent the browser to a hostgator page was inserted into the .htaccess file.  We did not do it.  someone else gained access and added the code.
LVL 30

Expert Comment

ID: 38372442
So what does your .htaccess file look like now? Is it back to normal? Have you tried a wordpress uninstall and reinstall?
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 38372607
Have not tried uninstall and reinstall yet - but think I will have to.

Have crisis in personal life and can't get free to reinstall.

I'm researching Wordpress .htaccess files and how they should be set up, but reinstall is probably best.


Obviously, if Wordpress is missing the subdirectory - it's got to be either the .htaccess or deep in the php code.
LVL 30

Accepted Solution

LZ1 earned 2000 total points
ID: 38372611
It sounds like it could be the .htaccess.  I would try posting it here if you have specific questions.

Or you could replace it with the following:

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

# END WordPress

Open in new window

Good luck with the crisis

Author Comment

ID: 38373396
Yes, something happened with the .htaccess.

I used a similiar .htaccess as yours.

But I had to use
in both the site and wordpress url in the general settings

Then change to permalinks.

It is working for now.  Fingers crossed.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Like there are many different versions of Wordpress, there are also a handful of related side projects WordPress users should be familiar with.   All of these projects are open source and GPL licensed, which means there are few restrictions to us…
Do you think that WordPress is just for blogs?  Think again!  WordPress is really a fantastic all around platform that you can use to develop websites on.  Integrated into its basic functionality is the ability to create pages using your choice of a…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question