Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   301 redirect on Wordpress (https://www.warriorforum.com/programming/323244-301-redirect-wordpress.html)

djmurray 28th January 2011 04:12 PM

301 redirect on Wordpress
 
Hi,
I've had a Wordpress blog in subdirectory /blog/ for some time but now want to move it into the root directory. I've worked out how to use 301 if I were moving it to an entirely different domain, but simply moving back a level on the same domain is defeating me. Can anyone suggest how? I should say that there are around 100 posts so I don't want to have to set up individual redirects for each one.
Thanks,
- David -

twmaffun 28th January 2011 05:35 PM

Re: 301 redirect on Wordpress
 
Not entirely sure, but I think an .htaccess rule would take care of this problem just fine.

Scoop 28th January 2011 05:47 PM

Re: 301 redirect on Wordpress
 
Just remember in your .htaccess file that you need to include the FULL url in your redirect, even if it is the same domain. As I don't have enough posts to be able to submit links here I'm not allowed to post anything that looks like a link, but basically it is:

Redirect 301 /blog <your full domain url>

shinepuppy 28th January 2011 06:37 PM

Re: 301 redirect on Wordpress
 
Hey David,
I did this exact thing with one of my blogs. You can use this plugin to redirect your visitors:

WordPress › Dean's Permalinks Migration « WordPress Plugins

You just input your old permalinks structure in the settings. For me it was:

Code:

/blog/%year%/%monthnum%/%postname%/

good luck :)

-jason

twmaffun 28th January 2011 08:48 PM

Re: 301 redirect on Wordpress
 
Quote:

Originally Posted by shinepuppy (Post 3268014)
Hey David,
I did this exact thing with one of my blogs. You can use this plugin to redirect your visitors:

WordPress › Dean's Permalinks Migration « WordPress Plugins

You just input your old permalinks structure in the settings. For me it was:

Code:

/blog/%year%/%monthnum%/%postname%/

good luck :)

-jason

Ah, thank you for an easy, and working solution :)

Cheers!

djmurray 2nd February 2011 05:10 PM

Re: 301 redirect on Wordpress
 
Many thanks for the help on this. I've been away for a fewa days but will now try the solution suggested. Thanks again.

Shri Krishna Technologies 4th February 2011 12:24 AM

Re: 301 redirect on Wordpress
 
there is plugin in wordpress called Simple 301 Redirects you can use it and redirect your all post wherever you want


All times are GMT -6. The time now is 03:15 PM.