I need
/secure/token/timestamp/path/to/the/resource/
to be rewritten in this format:
/s/path/to/the/resource/?st=token&e=timestamp
what I'm trying to do is:
location /secure/(?<token>)/(?<timestamp>)/(?<path>) {
rewrite ^ /s/$path/?st=$token&e=$timestamp
}
but it's obviously not working. This syntax doesn't seemed to be correct. How can I play like this with urls in nginx rules?
EDIT: trying now something like this: the same result:
location /secure/(.*)/(.*)/(.*) {
rewrite ^ /s/$3?st=$1token&e=$2timestamp;
}