http to https – WP in Subfolder issues
-
I am pulling my hair out with this issue. We recently got an SSL certificate and I am working on making sure all URLs with http redirect to https.
This is my current .htaccess code:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
When I add this code however:
<IfModule mod_rewrite.c> # BEGIN Force http to https RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*) https://%{HTTP_HOST}/$1 [R=301,L] # END Force http to https </IfModule> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
because my WordPress install is in a subfolder it breaks and tries to change my urls to https://www.mysite.com/subfolder/restoflink
Is there any way to fix this??
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘http to https – WP in Subfolder issues’ is closed to new replies.