Wordpress - 404 error on home page

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.

Who is Participating?
LZ1Connect With a Mentor Commented:
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
When you say the .htaccess was "hacked" what do you mean exactly?
aprillougheedAuthor Commented:
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.
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

So what does your .htaccess file look like now? Is it back to normal? Have you tried a wordpress uninstall and reinstall?
aprillougheedAuthor Commented:
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.
aprillougheedAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.