Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Logging in via /admin returns user to login page without being logged in

Go to End

13 Posts   5746 Views

Ryan M.

Community Member, 309 Posts

20 November 2010 at 12:37pm

So my problem is if you try to go to /admin and log-in using an administrator credentials or even the default login set via the _config.php file, it returns the user to the login page without logging them in.

The url says Security/login?BackURL=/admin

I tried flushing cache, rebuilding database, turning dev mode on, etc. Tried manually visiting the admin by typing it in, but it just keeps returning you to the login page.

The only thing I changed recently was to add GD::set_default_quality(100); to the _config.php and even removing it doesn't fix the problem.


Forum Moderator, 1899 Posts

20 November 2010 at 11:15pm

Hmmm, very strange!

What does it say on the screen? failed login? already logged in? nothing at all?

"Security/login?BackURL=/admin" --> this simple means that you are redirected back to do a login and when that has worked then you will get directed to admin.

Ryan M.

Community Member, 309 Posts

21 November 2010 at 10:00am

Yea, when you get bumped back to the login page it doesn't display any error messages or alerts or anything like that.

I even checked error log files, nothing in them about this.

Ryan M.

Community Member, 309 Posts

23 November 2010 at 6:57pm

Does anybody have any suggestions? I'm still stumped.

Tried logging in via a direct url but that didn't work either.

Seems like a cookie or session issue, or something isn't logging me in.


Community Member, 56 Posts

2 December 2010 at 1:12pm

You find a fix for this?
having exactly same problem.. getting redirected back to login.. no errors

Ryan M.

Community Member, 309 Posts

2 December 2010 at 1:20pm

Not yet, but I'm planning on doing another big push on this issue this week. I'll keep this thread updated of any fixes I find.


Community Member, 56 Posts

4 December 2010 at 2:04pm

just thought I would bump this... Any ideas greatly appreciated.
I have put the site in dev mode .. done a dev/build
flushed templates etc

But still cannot login or force login. Any ideas?


Community Member, 17 Posts

5 December 2010 at 11:05pm

From memory I did have the same problem, try:

1. Check your .htaccess file and make sure its all good and doesn't look weird mine looks like this

<Files *.ss>
Order deny,allow
Deny from all
Allow from

<Files web.config>
Order deny,allow
Deny from all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]

2. Make sure your not trying to login with any previous member session data.
3. put Security::setDefaultAdmin('admin','admin'); into your config file and try logging in
4. Remove all your themes included javascript and try that?

hmmm... I did figure this one. try the above and get back if it doesn't help


Go to Top