Django + Apache via FastCGI: http error code is erased
I am using Django + Apache via Fas开发者_C百科tCGI, having this code in error handler:
def handler404(request):
response = render_to_response('errors/404.html', locals(), context_instance=RequestContext(request))
response.status_code = 404
return response
I fetch invalid URL, see my custom 404 page, but there is something like this in apache access log:
- - [29/May/2011:15:10:29 -0700] "GET /qqq HTTP/1.1" 200 1316 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17"
Is it possible to have 404 code in Apache to tell, search engine crawlers, for example, that this page is not available? Thanks!
精彩评论