Nginx location regular problem

I use nginx and then I want nginx to satisfy XXXXXXXXXXXXX.. File suffix? md5=XXXXX (for example: test.jpg?md5=cno234f or test.mp4?md5=i9345nmjf ) access to a directory with alias , how can this rule be implemented? Thank you very much


official nginx cannot be implemented.
the reasons are as follows:

  1. alias of nginx , only available for location configuration blocks.
  2. location of nginx , the matching object is not $request_uri , but $uri
    and $request_uri equals $uri + $is_args + $args
    so using location will never match the ? md5=cno234f part of URL.

can work with lua to write a script implementation.

Menu