LOADING Advice, tutorials, and answers from the Hostrare technical support team.
Login your cpanel
1. Click the Redirects key on the front page under the “domains”
2. Enter the address of the web page to move in the first field.
3. Enter the redirection address in the following field. (this can be a subdomain
and maybe listed as a register on the home page).
4. Choose one of the following choices in the list:
*Temporary or *permanent
5. Click the Add button.
Redirect URLs in cPanel Servers
Redirect Examples using .htaccess
To redirect an entire site to a new domain:
Redirect 301 / http://www.new-domain.com
The following performs a 301 redirect based on the clients IP address, this could be used for banning IP addresses.
Banning an IP Address using ReWrite
RewriteCond %{REMOTE_ADDR} ^(A\.B\.C\.D)$
RewriteRule ^/* http://www.yourdomain.com/access-denied.html [L]To redirect a folder and all of the pages or files contained within it to another page or domain.
RewriteEngine On RewriteRule ^foldername/* http://www.domain.com/ [R=301,L]
Domain redirect
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.co.uk/$1 [R=301,L]Image Hotlink protection and redirect
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yourdomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://domain.com/hot-link.gif [L]PHP 301 Redirect
Insert the following in your index page.
ASP 301 Redirect
<% Response.Status="301 Moved Permanently" Response.AddHeader='Location','http://www.mysite.com/' %>
Redirect the user to secure connection (https://) can be accomplished with a .htaccess file containing the following lines:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]In case you wish to force HTTPS for a particular folder you can use:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} somefolder
RewriteRule ^(.*)$ https://www.domain.com/somefolder/$1 [R,L]The .htaccess file should be placed in the folder where you need to force HTTPS.
HTML Redirect
our suuport team here for you 24/7
+8801977507015 support@hostrare.com send a leter
Whether you are looking for a personal website hosting plan or a business website hosting plan, We are the perfect solution for you. Our powerful website hosting services will not only help you achieve your overall website goals, but will also provide you with the confidence you need in knowing that you are partnered with a reliable and secure website hosting platform.