Redirecting Users from Old Domain to New Domain

This section contains the codes and tips to improve the ranking of your site into the search engines. It will also contain info regarding the Mod Rewrite technique.

Redirecting Users from Old Domain to New Domain

Postby MT Shahzad on March 20th, 2008, 10:28 am

For a basic domain change from “old-domain.com” to “new-domain.com” (and folder/file names have not been changed), use the Rewrite rule to remap the old domain to the new domain. When checking the redirect live, the old domain may appear in the browser’s address bar. Simply check an image path (right-click an image and select “properties”) to verify proper redirection. Remember to check your site thoroughly after implementing this redirect.

# redirect from old domain to new domain
RewriteEngine On
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]
MT Shahzad
Web/Software Developer
http://mts.sw3solutions.com
User avatar
MT Shahzad
Site Admin
 
Posts: 300
Joined: February 29th, 2008, 8:11 am
Location: Muridke, Pakistan

Return to SEO - Search Engine Optimization

Who is online

Users browsing this forum: No registered users and 0 guests

cron