Redirect part of a website to https and http
-
Hello,
I need to have all my website on https except one directory that I must have on http (because of a plugin that is not SSL friendly).
I implemented the following .htaccess file:
RewriteEngine On RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} ^/blog/ RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} !^/blog RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^logout(.+) wp-content/themes/mc/logout.php$1 [R,L] </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 WordPressSomehow this doesn’t work as expected. When I try to access the website example.com/blog/ I get a redirect loop.
What am I doing wrong?Cheers
Luca
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Redirect part of a website to https and http’ is closed to new replies.