Skip to content

Instantly share code, notes, and snippets.

@JakeDEvans
Last active January 23, 2018 13:52
Show Gist options
  • Save JakeDEvans/77aa6f8ebb40630b2e5fc976c4162d3b to your computer and use it in GitHub Desktop.
Save JakeDEvans/77aa6f8ebb40630b2e5fc976c4162d3b to your computer and use it in GitHub Desktop.
# nginx config for overriding google search doamin for internal domains.
add google search https://www.example.com/search/%s
location ~* ^/search/(.*\.*)$ {
return 307 http://$1;
}
location ~* ^/search/(.*)$ {
return 307 https://www.google.com/search?q=$1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment