Last active
December 18, 2015 03:39
-
-
Save zx1986/5719970 to your computer and use it in GitHub Desktop.
Apache 301 redirect by .htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Apache 301 redirect using the .htaccess file | |
## If one wants to permanently forward an entire web site to a new URL or forward a single page permanently, | |
## and have the search engines update their database, one should use a 301 redirect. | |
## This may redirect to a new server or to itself but to a different domain. | |
## This method is a variation of using the mod_alias redirection shown above | |
## except that it allows the customer to redirect themselves by providing a .htaccess file themselves. | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^yolinux.com | |
RewriteRule ^(.*)$ http://www.yolinux.com/$1 [R=permanent,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment