[英]Error to many redirection .htaccess Magento
I changed my website from http to https with Lets Encrytp. 我使用Lets Encrytp将网站从http更改为https。 Now I can't access my Magento Admin console.
现在,我无法访问我的Magento管理控制台。 I read that it's because of the .htaccess file.
我读到这是因为.htaccess文件。
<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.
我不太擅长Web开发。
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. 如果您在Magento商店中遇到诸如TOY MANY REDIRECTS之类的错误,则问题是由于您的.htaccess文件或缓存文件夹所致。
Place a new copy of .htaccess
from a fresh magento package and delete the cache and session folder as well. 从新的magento程序包中放置
.htaccess
的新副本,并删除缓存和会话文件夹。 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
. 在
core_config_data
表中,删除web/cookie/cookie_domain
的值,并将web/cookie/cookie_httponly
设置为0
。 Clear the cache by removing the files in var/cache
. 通过删除
var/cache
的文件来清除var/cache
。 Also clear the cache from Magento admin panel 同时从Magento管理面板中清除缓存
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.