Support » Fixing WordPress » Force ssl/https for entire website

  • 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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    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.

    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!

    Moderator Mark Ratledge

    (@songdogtech)

    Forum Moderator

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

    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.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Force ssl/https for entire website’ is closed to new replies.