homepage Welcome to WebmasterWorld Guest from 54.196.63.93
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Moving WP to Root Folder and Keeping Existing Links
Moving WP Keep Links
pburke367



 
Msg#: 4561441 posted 6:16 pm on Apr 4, 2013 (gmt 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.

[http://examplesite.net/wordpress/category/page-or-post/]
to
[http://examplesite.net/category/page-or-post/]

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

Paul

 

phranque

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



 
Msg#: 4561441 posted 1:00 am on Apr 18, 2013 (gmt 0)

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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved