Wordpress - 404 error on home page

Posted on 2012-09-05
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
    LVL 30

    Expert Comment

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

    Author Comment

    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

    So what does your .htaccess file look like now? Is it back to normal? Have you tried a wordpress uninstall and reinstall?

    Author Comment

    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

    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

    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

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    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…
    WordPress is constantly evolving, and with each evolution appears to get better and better.  One of the big drawbacks prior to version 3 was that there was no way to be able to set up a custom menu from the backend. The Old Way Adding menus is…
    The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Open Page or Post…
    The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now