The 301 Permanent Redirect A are the most effective and search engine
friendly method because redirecting sites. You can use it in several situations
including:
· to redirect a old
website to a fresh address.
· to setup a lot of
domains pointing to one site.
· to enforce only one
version from your website (www. or no-www)
· to harmonize an domain
structure change
There is several ways to setup an 301 Redirect below I'll cover the
about used ones:
PHP Single Page Redirect
In order to redirect an static page to an new address just enter the
code below inside from the index.php file.
PHP Canonical Redirect
The Canonical 301 Redirect will add up (or remove) the www. prefixes to
all the pages inside your URL. The code below redirects the visitors by the
http://URL.com version to http://www.domain.com.
Apache .htaccess Singe Page Redirect
So to use these method you'll need to create a file named .htaccess
(not supported from Windows-based hosting) and place it on the root directory
from your site and then just add the code below to the file.
Redirect 301 /old/oldpage.htm /new/http://www.domain.com/newpage.htm
Apache .htaccess Canonical Redirect
Follow as is steps for before just insert the code below instead (it
will redirect every the visitors accessing http://web address.com to
http://www.domain.com)
ASP Single Page Redirect
These redirect method are used on the Active Server Pages platform.
ASP Canonical Redirect
The Canonical Redirect on ASP must comprise located in an script that's
executed in all page with the server before the page content starts.
Also Read:
0 comments:
Post a Comment