Broken INTERNAL link problem
I keep getting emails from django about broken INTERNAL links which I can't explain:
Referrer: http://www.emetor.com/forum/
Requested URL: /thanks/forum/
User agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
IP address: xxx.xxx.xxx.xxx
It seems that they are due to a contact form on the referrer page, which after successful submission redirects to http://www.emetor.com/thanks/. When I try a contact submission, everything works just fine. But I'm afraid that I might miss some contact submissions!
Somebody who has an explanation about where the problem could be? Please let me know if you need further information...
The contact 开发者_JAVA百科form does the following:
<form action="/contact/" method="post">
And in the view for contact:
def contact(request):
if request.method == 'POST': # If the form has been submitted...
form = ContactForm(request.POST) # A form bound to the POST data
if form.is_valid(): # All validation rules pass
...
send_mail(subject, message, sender_email, recipients)
return HttpResponseRedirect('/thanks/') # Redirect after POST
else:
form = ContactForm() # An unbound form
return render_to_response('contact.html', RequestContext(request,{'form': form}))
Log file shows that requested url is "/thanks/forum/", although you mention that successful submission redirect is "/thanks", so check the code where redirect url is created.
Other explanation could be that this link is saved by some crawler or bot and it try to request that page.
精彩评论