For example, rewriting /file/example to /q.html?id=example or /file/test to /q.html?id=test using NGINX.
How would that look like?
CodePudding user response:
There are a number of ways of preforming an external redirect in Nginx, but the simplest solution would be:
rewrite ^/file/(. )$ /q.html?id=$1 redirect;
See this document for details.