How to redirect ssl both with and without http:// https://www to https:// www and non-www

If you have sites that want to redirect to other sites that have SSL. You should added a script on your. Httacces


I have sites as below:

and I’ll redirect the site to

How to I fixed?? Here is I want to show you.

Open your .Httaccess file. Type this script  without “{” till “}”


RewriteCond% {HTTP_HOST}! ^ Abc \. Com $ [NC, OR]

RewriteCond% {HTTPS} off

# This checks to the make sure the connection is not already HTTPS

RewriteRule ^ (. *) $ Https:// $ 1 [R = 301, L]

# This rule will redirect users from their original location, to the same location but using HTTPS.

# I.e. to


And perfect done. Good luck

Leave a Reply

Your email address will not be published.