Google friendly domain redirect |
You must use Google friendly domain redirect in these cases:
administrator or hosting providers how to do that. Some times hosting providers call this – domain parking. Select configuration for desired case below. Replace domain names with your real ones and paste the code to file named ‘.htaccess’. Upload the file it into the root folder of your web page. Configuration for case #1RewriteEngine On RewriteBase /
# redirects old domain to a new one RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$ RewriteRule ^.*$ http://www.newdomain.com%{REQUEST_URI} [R=301,L] Configuration for case #2RewriteEngine On RewriteBase /
# redirects any alternative domain which name isn't "www.primarydomain.com" RewriteCond %{HTTP_HOST} !^www\.primarydomain\.com$ RewriteRule ^.*$ http://www.primarydomain.com%{REQUEST_URI} [R=301,L] Configuration for case #3RewriteEngine On RewriteBase /
# strips the "www" RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteRule ^.*$ http://domain.com%{REQUEST_URI} [R=301,L] |
Sumber : http://www.webtoolkit.info/google-friendly-domain-redirect-using-apache-rewrite.html |
Tidak ada komentar:
Posting Komentar