I use this for my htaccess force-SSL rule on my multisites (actually, on all sites).
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Not sure, but bet that off
is better than !=on
.A resource you can use to test htaccess rules is https://htaccess.madewithlove.com/ .
Related Posts:
- htaccess rewrite conflict with wordpress rules and ssl
- Globally force SSL on all pages
- Admin-Ajax.php, SSL, Non-SSL
- How disable SSL redirect for specific URL?
- How to modify the .htaccess to force ssl on login and admin pages
- Setup Permanent 301 Redirects after moving to Https [closed]
- Transfer to HTTPS – mixed content on main page only [closed]
- I can’t access the admin panel links as I click it shows 403 error
- Https Redirect infinite loop in Mobile browsers
- 403 error on admin login page
- Adding a SSL Certificate
- HTTP sitewide, except for: wp-admin, and 2 custom directories
- How can I fix the redirect chain after implementing ssl on wordpress?
- Conflict with Force SSL and Rewrite Rules
- Force non-ssl on WordPress RSS feeds in htaccess, using cloudflare
- Redirect https://www.subdomain.domain.com is not redirecting to subdomain.website.com [closed]
- Steps for WordPress over SSL
- Which one does WordPress prioritize when it comes to php.ini, wp-config and .htaccess?
- htaccess problem after saving Settings
- File and directory permissions
- htaccess disable WordPress rewrite rules for folder and its contents
- htaccess https redirect from www to non-www
- Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”
- How to redirect url requests to https? [closed]
- Isolating WordPress to a subfolder
- .htaccess Rewrite URL WordPress
- Why wordpress multisite redirect to wp-signup if site exists?
- What is the role of .htaccess file in WordPress?
- Remove File Extension for Page Outside of WordPress
- How can I code my plugin to safely modify .htaccess?
- HTAccess stops me from accessing WordPress Dashboard links
- different child theme for subdomain
- How do I edit the htaccess file to optimize my website?
- Block only external access to wp-cron.php on OpenLiteSpeed
- .htaccess rewrite rule puzzle
- Site searches by Python for non-existent assets
- Allow logged in users who doesn’t belong to whitelisted ips
- WordPress On subfolder
- Best way to redirect site in subdirectory to root?
- Missing slash after moving site to subfolder
- WildCard SSL with wordpress subdomain
- Override htacces rule only for specific directory
- How To Allow Only Specific User Agent To Access a URL?
- browser caching not disabled after disabling in .htaccess
- How to ignore folder in site root while accessing a URL
- How do I test to ensure that my wp-config file is protected?
- How can I enable keep alive (Not accessing to Apache)
- Preserve Domain Alias
- What is the right way to redirect all traffic to HTTPS?
- WordPress installed in root, need second in subdirectory with different domain
- htaccess has broken my site
- .htaccess in subdir gets ignored by WordPress’ own .htaccess in /
- TimThumb & htaccess : clean url
- Rules in .htaccess only if the requested URL is /wp-admin
- SSL and www to non-www redirection works only on homepage – WordPress
- Htaccess file isn’t redirecting http sub-pages to https––they display 404 error instead, tried many solutions and none work
- Only Allow Front End Access
- .htacess rewrite condition: page to seconddomain/page
- .htaccess RewriteCond excluding directories does not work when there is an .htaccess or php.ini in subdirectory
- Weird behavior of Dashboard, must be core files
- 404 error Additionally 403 Forbidden error on a URL
- Remove trailing slash after .html extension
- ReDirect subfolder link to another sub-folder and force SSL
- Does WP suppresses .htaccess if permalinks are disabled?
- Need help rebuilding lost htaccess file
- I have a page using a pretty url and a mod_rewrite rule matching it. I expected it to give an error but it’s working. Why?
- How do I setup htaccess for 301 redirects, post Joomla to WordPress migration? [closed]
- How to rename index.php to home.php
- Strange behaviour of is_user_logged_in() and get_current_user_id()
- Hide a subdirectory on my website hosting
- Can’t access WP site over WiFi network
- disable WordPress 404 for one specific page/folder to receive actual php errors
- .htpasswd asking for authentication on home page
- WordPress login fail after .htaccess domain redirect
- Redirect to new domain with .htaccess [closed]
- Access sub-domain when root public_html is protected with .htaccess password
- htaccess redirect throws an error: PHP Catchable fatal error: Object of class WP_Error could not be converted to string
- Can’t access htaccess [closed]
- WordPress permalinks confusion
- .htaccess redirect not properly working [ ?utm_source=]
- Should I prevent access to .htaccess and wp-config.php files?
- WordPress How to rewrite URL for custom pages
- How to properly give WordPress its own directory
- Downloading zip or tar.gz inside WordPress installation?
- Clicking PUBLISH Now Redirects to 404 PAGE NOT FOUND
- Unable to find ‘full-path’ to my 404.php file
- Question with .htaccess and wp-login.php prevention
- Use htaccess to redirect wordpress non-existent page to homepage
- htaccess old php pages to new wordpress ones
- Need to edit htaccess while moving on WordPress
- different CNAME to corresponding subfolders
- How can I create a private site that is inaccessible from the outside?
- Allowing access to certain WordPress created pages or posts with htaccess / htpasswd
- Issue after changing permalink structure [duplicate]
- rewrite rule on plugin activation
- Url redirection using htacess for my website
- WordPress Media Library rendering blank image tiles
- Subfolder install not working
- Redirect loops in Bing holding my sites back
- How do I modify each instance of setcookie?