I need to rewrite/redirect a number of simple URLs to more complex ones and those destination URLs are stored in files and can be accessed by any (e.g. bash) script. Indeed I use a CGI script that accesses and uses those URLs for audio streaming. Although I could enter these URLs into nginx's rewrite rules to accomplish what I need, I don't want to have to duplicate them as that just complicates things and makes keeping them updated more error prone.
The only way to do this that I can think of is to direct requests to a CGI that CAN read the required files and redirect appropriately.
However, what I really want to do is create nginx rewrite rules that access these script files in order to create the destination URLs to which the requests are redirected. Is this possible? Can rewrite rules utilise other files in this way?
Edited 1 time(s). Last edit at 05/28/2021 09:43AM by UKenGB.