How to redirect a website url from http to https ?

Home Forums WordPress How to redirect a website url from http to https ?

This topic contains 1 reply, has 2 voices, and was last updated by  Sushmita Ghosh 9 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #790

    Sushmita Ghosh
    Keymaster

    I recently bought SSL certificate from Godaddy. I also added the certificate to the domain. Now, i want to redirect all my urls to https…, How can I do that ?

    #791

    Sushmita Ghosh
    Keymaster

    Add the below code in your .htaccess file and all your urls will be redirected to https

    RewriteEngine On

    RewriteCond %{HTTPS} off

    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # BEGIN WordPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteRule ^index\.php$ – [L]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    </IfModule>

    # END WordPress

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

You must be logged in to reply to this topic.

Pasham Technology © 2018 Pasham Technologies