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/

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
mornaner's avatar
109
mornaner
asked 12 years ago, updated 12 years ago

Comments

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

ripper234's avatar ripper234 (12 years ago)
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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
mornaner's avatar
109
mornaner
answered 12 years ago
link

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago, updated 12 years ago
link

Comments

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

mornaner's avatar mornaner (12 years ago)

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 (12 years ago)
see more comments