Announcement

Collapse
No announcement yet.

How To Redirect To https From .htaccess?

Collapse

Ads on showthread pages

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To Redirect To https From .htaccess?

    WordPress Hosting on SSD Servers
    You may want to redirect users of your website directly to SSL URL https://www.domain.com when they browse your domain without SSL (https) like http://www.domain.com or http://domain.com.

    You can do it via simply adding below rewrite rules from .htaccess file of your domain. Below is the sample code:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

    You can do the same via below code also:

    Redirect permanent / https://www.domain.com/
    Last edited by admin; 07-29-2015, 07:47 AM.
Working...
X
Sign up for a News Letter Click here to sign up