Ask Your Question
1

Problem accessing /admin - redirects to old domain

asked 2012-12-30 08:29:51 -0600

mornaner gravatar image

updated 2013-01-16 12:33:05 -0600

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/
edit retag flag offensive close merge delete

Comments

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

ripper234 gravatar imageripper234 ( 2013-01-02 02:48:12 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-22 12:36:58 -0600

mornaner gravatar image

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

edit flag offensive delete link more
0

answered 2013-01-08 17:48:08 -0600

Evgeny gravatar image

updated 2013-01-08 17:49:13 -0600

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.

edit flag offensive delete link more

Comments

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

mornaner gravatar imagemornaner ( 2013-01-10 01:27:19 -0600 )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 gravatar imageripper234 ( 2013-01-11 02:35:05 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-12-30 08:29:51 -0600

Seen: 206 times

Last updated: Jan 22 '13