Hi, I have a django application serving from my root domain e.g. domain.com/ this page generates the home page from django. So I have / -> django and I understand that I can only have one app mapped to / However I would also like to serve robots.txt statically at domain.com/robots.txt plus some other static files off /. What would be the recommended way to do this? Have django serve these static files from a view? Is it possible to have nginx look for a static file and if not there redirect to django app? Or something else, Thanks, asked 21 Sep '12, 04:10 alpatters |
There are a few ways to server your robots.txt file. One could be by editing your application's httpd.conf file, adding some alias, or using django's urls.py to create the response. See our old forum post that covers the basics. Another way would be to install an app like django-robots. answered 21 Sep '12, 04:22 iliasr ♦♦ |