Last active
August 29, 2015 14:25
-
-
Save ryanfitton/9da95acb2653c979b6de to your computer and use it in GitHub Desktop.
This snippet is great to use if you have recently switched your Wordpress website over to HTTPS only. Paste this snippet into your .htaccess and overwrite the standard Wordpress code at the top of the file. https://ryanfitton.co.uk/blog/force-all-incoming-wordpress-http-links-to-https/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment