Serving favicon.ico with Django. Why does settings.MEDIA_URL with django.views.generic.simple.redirect_to only work on dev environment?

Viewed 17673

I found this solution for serving favicon.ico with django.

(r'^favicon\.ico$',
  'django.views.generic.simple.redirect_to',
  {'url': settings.MEDIA_URL+'images/favicon.ico'}),

I do not understand why it only works for the development server. Going to /favicon.ico works on dev, doesn't with debug=False. It should redirect to /media/images/favicon.ico (served by apache), which does work if you access it directly.

Any ideas?

3 Answers
Related