How to redirect a bkhost domain to another site?
Some cases of redirecting the path are common
1. Redirect 1 single link
To redirect the individual paths as shown below
http://example.com/old-path.html => http://example.com/new-path.html
You can use 301 redirects like this:
Redirect 301 /old-path.html /new-path.html
2. Redirect the path from the old domain name to the new domain name
http://example.com/* => http://example.net/*
If you already have an old domain name like example.com, and now you have decided you really want to use example.net for the site. You can set up 301 redirects for the entire domain, so that users who access the old path can immediately be redirected to your new domain.
RewriteEngine on
RewriteCond% {HTTP_HOST} ^ example.com [NC, OR]
RewriteCond% {HTTP_HOST} ^ www.example.com [NC]
RewriteRule ^ (. *) $ Http://example.net/$1 [L, R = 301, NC]
3. Redirect the link from www to non-www
http://www.vinasupport.com/* => http://vinasupport.com/*
A search engine like Google will see example.com and www.example.com, which are basically two separate websites. They recommend that you choose a category you want the search engine to display and use 301 redirects to redirect to one.
To redirect the path from www to non-www in htaccess you can do the following:
RewriteEngine on
RewriteCond% {HTTP_HOST} ^ www.vinasupport.com [NC]
RewriteRule ^ (. *) $ Http://vinasupport.com/$1 [L, R = 301, NC]
4. Redirect the path from http to https
http://vinasupport.com/* => https://vinasupport.com/*
Chrome and Firefox have begun displaying unsafe warnings on websites without SSL certificates. Without SSL, your site will appear unsafe for visitors. Therefore, use an SSL encrypted connection for security reasons. Redirecting from HTTP to HTTPS is very important.
To navigate the website to https we can do the following:
RewriteEngine On
RewriteCond% {SERVER_PORT} 80
RewriteRule ^ (. *) $ Https://vinasupport.com/$1 [R, L]
×