Skip to content

Instantly share code, notes, and snippets.

@guillaumepiot
Created July 23, 2014 09:07
Show Gist options
  • Save guillaumepiot/e015a3dea6f8ffd661be to your computer and use it in GitHub Desktop.
Save guillaumepiot/e015a3dea6f8ffd661be to your computer and use it in GitHub Desktop.
NGINX - Rewrite query string to url path
location ~ /more_details.php {
if ($args ~* "^profileID=(\d+)") {
set $mid $1;
set $args '';
rewrite ^.*$ /view/$mid permanent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment