Something very strange has happened and I'm at a complete loss as to how to go about working out the cause.
I used Backup / Migrate module to restore a backup of my live site's database (let's call it somesite.com) onto my dev site's database (let's call it dev.somesite.com) after copying the files over.
I visited dev.somesite.com/admin/ and was surprised to be told it was in maintenance mode. I did the usual maintenance mode fixes:
drush vset maintenance_mode 0, checking that the contents of variable > maintenance_mode in the database was
i:0;, but it still showed as maintenance mode.
A little trial and error later, I discovered that dev.somesite.com/admin did work, and it seemed having a trailing slash in the URL would show the maintenance mode page.
What could possibly be causing such a strange behaviour? My first thought was, since it's a URL formatting issue, there might be a mistake in my
.htaccess file, but it looks fine and hasn't changed.
Update: a little more testing seems to show that this only happens for URLs the user doesn't have access to. For example, dev.somesite.com/admin/ while logged in gives the expected user access error, dev.somesite.com/about-us/ while not logged in redirects to dev.somesite.com/about-us and then works fine, but dev.somesite.com/admin/ while not logged in gives the maintenance page not the access denied page.
So, it's not as serious a problem as I first thought, but it's still strange and smells like a sign I might have misconfigured something which might in turn have more serious consequences elsewhere - but I don't know what this could be. I've looked at my Global Redirect settings and they look fine.