Welcome to WebmasterWorld Guest from 54.162.12.134

Forum Moderators: phranque

Message Too Old, No Replies

301 Redirect For Wordpress Site

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

WebmasterWorld Senior Member 5+ Year Member



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]

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

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



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.
4:43 pm on Mar 11, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi Lammert

Can you elaborate on the "server header checker"..
4:52 pm on Mar 11, 2010 (gmt 0)

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



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.
5:02 pm on Mar 11, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Thank you for the clarification. Yes, I have an account on Google WMT. I shall check it from there.
5:11 pm on Apr 9, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month