Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Moving WP to Root Folder and Keeping Existing Links

Moving WP Keep Links

6:16 pm on Apr 4, 2013 (gmt 0)

New User

joined:Apr 4, 2013
posts: 1
votes: 0

I am moving a photography blog from [http://examplesite.net/wordpress] to [http://examplesite.net].

I need to redirect the existing links for pages and posts to the the new pages.


I will be using the following rewrite:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) [examplesite.net...] [R=301,L]

Will this accomplish what I need?

Thanks in Advance

1:00 am on Apr 18, 2013 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 8

welcome to WebmasterWorld, Paul!

RewriteRule (.*) [examplesite.net...] [R=301,L]

this is incorrect syntax and won't do anything useful - probably detrimental to server function.

you will need something in your RewriteRule Pattern that specifies a capture group excluding the "wordpress" part of the path and back-references that in the Substitution string.
with a redirect you also want to specify a complete hostname starting with the protocol (http:) in the Substitution string.

IMPORTANT: Please Use example.com For Domain Names in Apache Web Server forum Posts:
http://www.webmasterworld.com/apache/4452736.htm [webmasterworld.com]