cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 admin redirecting to homepage

Magento 2 admin redirecting to homepage

I have recently purchased an SSL Certificate and updated my .htaccess with the following code

 

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}


So that it will be a secure site.

But now when i go to /admin it redirects back to the store homepage. I removed the code from .htaccess but it still redirects. i have already cleared the var/cache folder and that didn't solve the problem.