def send_head(self): # rewrite URLs: /abs/[bibcode] => script in /cgi-bin if self.path.startswith('/abs/'): self.path = '/cgi-bin/nph-data_query?link_type=ABSTRACT&bibcode=' + self.path[5:] return CGIHTTPRequestHandler.send_head(self)