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

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
301 Redirect For Wordpress Site
anand84




msg:4090112
 5:26 pm on Mar 2, 2010 (gmt 0)

Hello everyone

I have a wordpress site at example1.com which I need to move to example2.com/folder1. Since I have a decent traffic on the site, I am quite apprehensive of how to go about it.

I was advised to place the following code in the header

# BEGIN WordPress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example1.com
RewriteRule (.*) http://www.example2.com/folder1/$1 [R=301,L]
# END WordPress


But I am not sure if this will suffice. I checked with an example redirection offered on the site. While it works beautifully, I also noticed that the two sites show separately on alexa.com (If I am not wrong 301 redirected websites redirect on alexa too).

I am kind of confused. Can you help?

Thanks

[edited by: bill at 8:23 am (utc) on Mar 4, 2010]
[edit reason] de-link example [/edit]

 

lammert




msg:4094883
 6:35 pm on Mar 10, 2010 (gmt 0)

You can use a server header checker to see if URLs from the old domain properly redirect to URLs on the new domain with a 301 redirect code. There is a server header checker available here on this board in the subscriber section, but you can also use the "Fetch as Googlebot" option in Google's Webmaster Tools or use a server header Firefox extension.

If the 301 is correctly returned, it takes some time until the search engines and Alexa have processed the move of all the URLs from the original domain to the new.

anand84




msg:4095513
 4:43 pm on Mar 11, 2010 (gmt 0)

Hi Lammert

Can you elaborate on the "server header checker"..

lammert




msg:4095523
 4:52 pm on Mar 11, 2010 (gmt 0)

A page served by a webpage consists of two parts, the header and the actual content. The header part contains a number of lines which give information which is directly relevant for the browser to interpret the page. These line tell if the resource has been found or not, or is maybe available on another location (301 redirect info), the MIME type and encoding of the resource, if it is allowed to cache the resource and in some occasions also cookies.

This header part is never shown in your browser, but rather directly interpreted. A server header checker makes these header lines visible. One possiblity is to use a plugin in your browser like the Header Spy plugin for Firefox. Another possibility is to let a server load the page, extract the header for you and display it to you in a web page. If you are a subscriber here on WebmasterWorld you can find such a server based header checker in the subscription forum. But you can also sign up for a free Google Webmaster Tools account which gives you the possibility to view your pages like Googlebot sees it, including these header lines.

anand84




msg:4095527
 5:02 pm on Mar 11, 2010 (gmt 0)

Thank you for the clarification. Yes, I have an account on Google WMT. I shall check it from there.

anand84




msg:4113066
 5:11 pm on Apr 9, 2010 (gmt 0)

Hi

I will be performing the 301 redirect tomorrow..Have this small doubt that I hope you shall clarify

For redirecting, I was advised to place this in .HTACCESS


Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.example.com/$1 [R=301,L]


I just checked with my existing htaccess file which reads thus (I'm quoting only the relevant portion)

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


Now, my doubt is will it simply suffice if I add the Options +FollowSymLinks and RewriteRule (.*) http://www.example.com/$1 [R=301,L] immediately before and after the boldened text in the quote above?

Please clarify.

Thanks

[edited by: engine at 5:35 pm (utc) on Apr 9, 2010]
[edit reason] please use example.com [/edit]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
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