#NEWLINE# def _fqdn_redirections( protocol , local_project_root , remote_project_root , web_server_config ) : #NEWLINE# #INDENT# bad_fqdns = web_server_config . get ( 'bad_fqdns' , [ ] ) #NEWLINE# if ( not remote_project_root ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# return '\n' . join ( [ '\n' . join ( [ 'server {' , '  listen 80;' , '  server_name {};' . format ( bad_fqdn ) , '  return 301 {}://{}$request_uri;' . format ( protocol , web_server_config [ 'fqdn' ] ) , '}' ] ) for bad_fqdn in bad_fqdns ] )