I'm trying to configure a workaround for google's WontFix search behavior in nginx by having a simple subfolder for my searches.
So far this is what I have.
location ~* ^/search/(.*\..*)$ {
return 307 http://$1;
}
location ~* ^/search/(.*)$ {
return 307 https://www.google.com/search?q=$1;
}
However this matches spaces, how can I update the first location block to only match non-whitespace characters.