Redirecting your domain or any subdirectory
Nyomtatás
2
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: