I am trying to rewrite the following url in NGINX:
https://example.com/ab12-cdef4567?c=123
Into this:
https://example.com/ab12-cdef4567.php?c=123
The pattern will always be {4 alphanumeric}-{8 alphanumeric}
This is what I am attempting without success:
rewrite ^/(.{4}-.{8})?(.*)$ /$1.php?$2 last;
