views:

32

answers:

2

I administer my wife's site, namelymarly.com. Up until last week, the root page of the blog was namelymarly.com/blog/.

Last week I changed it in the WP settings to be namelymarly.com.

WP created the new htaccess file, and I moved the index.php to the root directory (but left the WP folder where it was in the /blog/ directory), as instructed. Everything is working great except for one very important thing:

When you type 'namelymarly.com/blog/' into a browser now, you get a 404 error.

All other URLs, when they include the '/blog/somethinghere', will redirect properly to '/somethinghere.' It's only when there's nothing after '/blog/' that there's a problem.

I tried adding this rule but it still redirects to the 404 page:

RewriteRule ^/blog/$ /index.php

Any suggestions/help?

A: 

install "Redirection" and then add a 301 redirect from namelymarly.com/blog/ to namelymarly.com

poindexter
Thanks, I think that worked. I would like to know how this could be done via the htaccess file, though, and why WP didn't take care of this initially. Thanks again!
A: 

Did you follow these diections?: Moving WordPress « WordPress Codex

You don't need the redirection plugin. Wordpress handles redirects if you regenerate permaliks. If you have to, use this in .htaccess before the Wordpress rewrite block:

Redirect 301 /blog http://namelymarly.com

But first, be sure you've reset your permalinks in Dashboard/Settings/Permalinks and make sure that copy the changes to .htaccess yourself and that there is only the most recent - the last - rewrite block in the file (WP has a habit of adding more and more rewrite blocks to .htaccess).

And check the URLs of your other URLs in the post/page editor and see if they contain /blog/

songdogtech
Any page viewed in the dashboard has the /blog/ in the URL. I tried regenerating permalinks but there was no change to the URLs of posts. I assume this is expected; I have the "WordPress address" set to namelymarly.com/blog" and the "Blog Address" set to namelymarly.com...
What are you trying to do? Completely get rid of /blog/ in your URLs? Have a page that is called Blog that has your posts along with a static front page? The reason /blog/ is still in your URLs is the different settings you have for WP address and Blog address.
songdogtech