htaccess
-
Trying to add a https ReWrite Rule in the .htaccess file in public_html to force my site to load https.. all the the time. Not just only when a form loads for user input.
When I do, my admin login page will not work. (http://www.donain-name.com/wp-login.php) When I enter the login credentials, the username and password just go away and nothing happened.
This happens when I add this to my .htaccess file
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
RewriteEngine on RewriteCond %{HTTP_HOST} !^www.my-domain-name.com$ RewriteRule ^(.*)$ https://www.my-domain-name/$1 [R=301]For a total .htaccess file of
# 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 RewriteEngine on RewriteCond %{HTTP_HOST} !^www.my-domain-name.com$ RewriteRule ^(.*)$ https://www.my-domain-name/$1 [R=301]When I remove the added
RewriteEngine on RewriteCond %{HTTP_HOST} !^www.my-domain-name.com$ RewriteRule ^(.*)$ https://www.my-domain-name/$1 [R=301]Everything goes back to work fine.
If I remove the
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>My permlinks stop working.
Anytips please..
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘htaccess’ is closed to new replies.