Skip to content

Instantly share code, notes, and snippets.

@newbamboo
Created February 16, 2009 22:31
Show Gist options
  • Save newbamboo/65423 to your computer and use it in GitHub Desktop.
Save newbamboo/65423 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name blog.new-bamboo.co.uk;
client_max_body_size 10M;
root /usr/local/www/nb_blog_jekyll/_site;
rewrite ^/archives/.* /archive permanent;
location /search {
if ( $args ~ "q=(.*)" ) {
set $args "site=&hl=en&q=site%3Ablog.new-bamboo.co.uk+$1";
rewrite ^ http://www.google.com/search permanent;
}
}
location / {
if (-f $request_filename.html) { rewrite (.*) $1.html break; }
}
default_type text/html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment