WordPress.org

Ready to get started?Download WordPress

Forums

Force ssl/https for entire website (7 posts)

  1. fishthefly
    Member
    Posted 4 years ago #

    Hello,

    I have recently secured SSL certificates for my website and I would like to force HTTPS for all visitors. I have read that this can be accomplished via .htaccess, however, when I place the .htaccess file in the root directory of my site, something malfunctions and breaks a lot of my existing code.

    This is what I am placing in the .htaccess file:

    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]

    What have I done wrong and how can I begin fixing this issue? Thank you for your time and help.

  2. Jonas Grumby
    Member
    Posted 4 years ago #

    Are you using a custom Permalink structure? Did you remove the WordPress rewrite rules from .htaccess? Try setting Permalinks to default and then back to whatever you had so that WordPress will put those lines back into the .htaccess file.

  3. fishthefly
    Member
    Posted 4 years ago #

    Thank you for your quick response. No, I have not removed anything from the default .htaccess file. This is a complete copy of the code:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]
    </IfModule>
    # END WordPress

    Thanks again.

  4. fishthefly
    Member
    Posted 4 years ago #

    I am still struggling with this issue and am curious to see if there are any additional suggestions out there. Any assistance would be greatly appreciated. Thank you!

  5. Old thread, but here's an answer for forum searchers: Using WordPress with SSL

  6. Mvied
    Member
    Posted 3 years ago #

    To run the entire site in SSL, simply change your WordPress Address and Site Address in the General Settings of your blog to https rather than http. That's all you have to do.

  7. davidealex
    Member
    Posted 3 years ago #

    Mike, I don't see this option under WordPress 3.0 Network (MU). Is it a different setting for MU?

Topic Closed

This topic has been closed to new replies.

About this Topic