Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello, you can use the “Easy HTTPS Redirection” for redirecting from http to https, you can find the plugin from HERE, if you don’t want to use the plugin you can achieve this via updating your .htaccess file, place this code to your .htaccess file and this will redirect every http request to https.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # BEGIN WordPress
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Hope this will help you.
    Thanks.

    Thread Starter worldbus

    (@worldbus)

    Thank you, its working fine now.
    For test: http://www.persianwhois.com/services/virtual-server/
    Then it will redirect to:
    https://www.persianwhois.com/services/virtual-server/

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Always redirect to https’ is closed to new replies.