redirect based on file content

Torsten Curdt tcurdt at vafer.org
Mon Jul 16 14:38:38 UTC 2018


I want to have files in the filesystem that specify the response code and
redirect location instead of relying on the nginx configuration for it.

Imagine a file foo.ext looking like:

  301 https://some.host.com/foo.bla

On a GET of foo.ext it should result in a 301 to
https://some.host.com/foo.bla

So far I haven't found a module for this. I presume it should not be too
terribly hard to write a module for it but maybe I missed something? So I
thought I rather double check if there is an easier route.

Any thoughts?

cheers,
Torsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180716/498a583d/attachment.html>


More information about the nginx mailing list