Just Host Limited

Just Host Help Center

 
 

If you can't find what you're looking for,
please click here to submit a support ticket.

Submit Support Ticket

If you can't remember your cPanel or Billing Logins,
Please click here to have them resent .

Forgotten Your Password?
 

Article Details

Last Updated
24th o June, 2008


Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions ( )

How would you rate this answer?



Thank you for rating this answer.

questionHow do I create a redirect for my site?

These rules should be added to your .htaccess file located in your public_html folder.

This rule will redirect all none SSL traffic to the SSL (https) portion of your site: 

RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ https://yourdomain.com%{REQUEST_URI} [NS,R,L]

In addition use one of the following rules, www.yourdomain.com is different from yourdomain.com. You will need to redirect all traffic from one to other.

If your SSL is for www.yourdomain.com you will want to use the first rule to redirect all yourdomain.com traffic to www.yourdomain.com. This rule will direct all traffic to yourdomain.com to www.yourdomain.com.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain.com$
RewriteCond %{REQUEST_URI} !^.*www.*$
RewriteRule ^(.*)$ http://www.yourdomain.com [R=301]

If your SSL is for yourdomain.com you will want to use the first rule to redirect all www.yourdomain.com traffic to yourdomain.com. This rule will direct all traffic to www.yourdomain.com to yourdomain.com.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yourdomain.com$
RewriteRule ^(.*)$ http://yourdomain.com [R=301]

*replace yourdomain.com with the domain you need to redirect to.


Continue