homepage Welcome to WebmasterWorld Guest from 184.73.87.85
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

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:4561443
 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




msg:4565822
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved