Created
September 22, 2014 11:59
-
-
Save svfat/5c6841182850af63cd03 to your computer and use it in GitHub Desktop.
Django robots.txt "disallow all bots"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
urlpatterns = patterns('', | |
... | |
(r'^robots\.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /", mimetype="text/plain")) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment