I changed my website from http to https with Lets Encrytp. Now I can't access my Magento Admin console. I read that it's because of the .htaccess file.
<IfModule mod_rewrite.c>
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
#RewriteBase /magento/
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
############################################
## redirect for mobile user agents
#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]
</IfModule>
Can you tell me what I have to change? I'm not quite good in Web development.
If you are experiencing error like, TOO MANY REDIRECTS on your Magento store, then the issue is because of your .htaccess file or your cache folder.
Place a new copy of .htaccess
from a fresh magento package and delete the cache and session folder as well. Then refresh and it should be good.
Or another way is,
In the core_config_data
table remove the value of web/cookie/cookie_domain
and set web/cookie/cookie_httponly
” to 0
. Clear the cache by removing the files in var/cache
. Also clear the cache from Magento admin panel