diff options
author | Matthew Somerville <matthew@mysociety.org> | 2010-10-12 12:01:09 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2010-10-12 12:01:09 +0100 |
commit | e9d1c55ae5f5f8bfacd8b895660babd94e3469d2 (patch) | |
tree | 50e3e17890ea88b78a4e0576322d79785a3410c5 | |
parent | 05c7209738695b736e387a0fb226ff1673e0e486 (diff) |
Work with bad URL by bad bots.
-rwxr-xr-x | web/reports.cgi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/reports.cgi b/web/reports.cgi index bc418db7c..4faee63f9 100755 --- a/web/reports.cgi +++ b/web/reports.cgi @@ -67,6 +67,10 @@ sub main { } } elsif ($q_council =~ /^\d+$/) { my $va_info = mySociety::MaPit::call('area', $q_council); + if ($va_info->{error}) { + print $q->redirect($base_url . '/reports'); + return; + } $area_name = $va_info->{name}; print $q->redirect($base_url . '/reports/' . Page::short_name($area_name)); return; |