First time here? Check out the FAQ!
1

Problem accessing /admin - redirects to old domain

We have an issue with the site domain. When doing the migration we tested the site at beta.draw3cards.com and this was the domain in the settings.

Now the site is in production and I have changed settings.py:

DOMAIN_NAME = 'draw3cards.com'

CSRF_COOKIE_NAME = 'draw3cards.com_csrf'

The site works well, but when I try to access draw3cards.com/admin the site redirects me to beta.draw3cards.com/draw3cards/admin and, obviously, doesn't work.

UPDATE:

I've searched both in the code and the database the string beta.draw3cards.com and it doesn't appear in either one.

However, looking in error_log I found this:

[Wed Jan 16 17:54:23 2013] [debug] mod_deflate.c(615): [client xx.xx.xx.xx] Zlib: Compressed 337 to 234 : URL /draw3cards/admin/
mornaner's avatar
109
mornaner
asked 2012-12-30 08:29:51 -0500, updated 2013-01-16 12:33:05 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Suggested edit: Problem accessing /admin - redirects to old domain

ripper234's avatar ripper234 (2013-01-02 02:48:12 -0500) edit
add a comment see more comments

2 Answers

1

@ripper234 was able to fix this. It was a rule in our apache config what was causing this problem.

mornaner's avatar
109
mornaner
answered 2013-01-22 12:36:58 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

Try setting CSRF_COOKIE_DOMAIN to empty string, it is not necessary actually, or you could make it '.draw3cards.com'. Either way cookie would be shared between all subdomains.

Evgeny's avatar
13.2k
Evgeny
answered 2013-01-08 17:48:08 -0500, updated 2013-01-08 17:49:13 -0500
edit flag offensive 0 remove flag delete link

Comments

Tried setting CSRF_COOKIE_DOMAIN to '' and still get the same result.

mornaner's avatar mornaner (2013-01-10 01:27:19 -0500) edit

BTW, I think I didn't receive an email notification about this post, even though I have "email me when there are any new answers" checked. I believe I actually don't receive any emails from Askbot. Nothing in my spam folder.

ripper234's avatar ripper234 (2013-01-11 02:35:05 -0500) edit
add a comment see more comments