I have a route with urls that can have an optional extra field. It can be either of the form :
- "/my-route/azezaezaeazeaze.123x456.jpg"
- "/my-route/azezaezaeazeaze.123x456.6786786786.jpg"
with :
- "azezaezaeazeaze" being a mongoId
- 123x456 two integers separated by "x"
- 6786786786 a unix timestamp
- jpg an image extension (could be jpeg, png, gif...)
- all those are separated by a "."
I would like to remove the optional part (the timestamp) from the request with the http rewrite module. So that the second url effectively becomes lie the first.
I made a small test on regex101 to get the groups, but : - it doesn't seem to be the right syntax for nginx - I do not see how it will allow me to remove the timestamp
How can I remove the timestamp from that url?