I need to setup dynamic redirections. For example, a user open a link : http://www.example.com/2/3/4/ and see the page on the following address: http://www.example2.pl/something.
I know about RewriteMap, but I need something which don't require nginx to restart, that is fast, simple, and is easy to use with sftp (without a database in the server).
My idea is to push files with URLs inside and configure nginx to use this file content - it is nice to me, because I can easily do it via sftp.
How can I manage to achieve this in nginx ?
My second idea is to return this file to the user and use javascript redirection. I prefer the first solution so please tell me how to read the requested file content and redirect to URLs inside.
Maybe there are some other solutions, like DNS, please tell me what will be the best.