I recently moved my Drupal 7 site to a new hosting server and I\'m stuck at the login page. As soon as I try and log in, I get directed back to the same page, but the URL change
In my case the issue was solved only after refreshing .htaccess file in drupal root folder. You can take the source here: https://github.com/drupal/drupal/blob/7.x/.htaccess
seddonym's comment about mod_rewrite led me to a slightly different solution. I was having the same problem but was able to solve it by copying the file rewrite.load
from /etc/apache2/mods-available
to /etc/apache2/mods-enabled
.
I think the files in mods-enabled are some sort of link files (I am novice at linux still) but copying the files worked just fine. Maybe someone will come along and tell us the proper way to do this.
I suspect your $cookie_domain
in /sites/default/settings.php
is incorrect.
Try making it match your new domain and ensure there's a leading dot .
$cookie_domain = '.mydomain.co.uk';
Sometimes all you need is to clear the cookies for the domain/website - it's possible you have old cookies alive that are causing this.
Get a cookie manager to help simplify this, e.g.:
Edit This Cookie (for Chrome)
Other answer might be that rewrite php module is not installed, to do that do the followings:
sudo a2enmod rewrite
Restart apache2
sudo service apache2 restart
In my case it was very stupid, on my page.tpl.php, there wasn't any "content" and the page--user.tpl.php didn't get read. Only had the line to show content in the page.tpl.php
Although that it is unlikely that you're as stupid as me. ;) Maybe it will be helpful anyway.
Arne