Client Login

Redirecting your domain or any subdirectory

By adding a "Redirect" statement to your .htaccess file, you can redirect any subdomain or your whole domain to any other file or domain in the Internet.

Each "Redirect" statement contains the "Redirect" command, the location to be redirected and the target of the redirection. You may redirect your domain to some other domain you own or you may redirect requests for e.g. "/color" to a subdirectory called "/colour".

301 redirect is the best method to preserve your current search engine rankings when redirecting web pages or a web site. The code "301" means "moved permanently".

Enter a line like below to redirect your Domain (it will not redirect if there is a request for a specific sub-page):

Redirect 301 /index.html http://www.foo.com

Enter a line like below to redirect a subdirectory:

Redirect 301 /redirectthis/index.html http://foo.com/target.html

Hint: In both cases the target must be a full URL starting with http:// even if the target of the redirection is located in your domain.

Hint: Always include the index page name after a directory name.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read