Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2019
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How I redirect From http ->>> Https

    I’m trying to redirect HTTP to HTTPS but it’s not working.

    Actually recently I updated my website with SSL certificate in that everything is done. I have added redirect code in my .htaccess file.

    RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] But the only Homepage working perfectly. It’s automatically redirecting http://www.lyricsfed.com to https://www.lyricsfed.com
    But all others page/post did not get redirecting. I am using your plugin, please give me a solution for all page redirecting.

    I want to redirect my all post automatically.

    Example: http://www.example.com/post/ to https://www.example.com/post/

    Pleases short out my problem.
    Last edited by VIPStephan; Jan 16th, 2019 at 11:46 AM. Reason: removed automatically generated links

  2. #2
    New to the CF scene
    Join Date
    Dec 2018
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You need to install SSL Certificate. Once you install an SSL certificate on your website, you need to redirect your visitors to the secured (HTTPS) version of your site. Choose the hosting scenario for your website: ... Redirect my WordPress website to HTTPS in cPanel hosting after my SSL certificate is installed. Redirect my website to HTTPS in Plesk/Windows.

  3. #3
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,322
    Thanks
    4
    Thanked 478 Times in 466 Posts
    The technique I like to use is this:

    Code:
    RewriteEngine On
    
    RewriteCond %{HTTPS} off [OR]
    RewriteCond %{HTTP_HOST} ^www\. [NC]
    RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
    RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
    That will send www to non-www, as well as http to https, all in one fell swoop as good ol' 301.
    ďThere are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.Ē Ė C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •