Welcome! Log In Create A New Profile

Advanced

redirect based on file content

Torsten Curdt
July 16, 2018 10:40AM
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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

redirect based on file content

Torsten Curdt July 16, 2018 10:40AM

Re: redirect based on file content

itpp2012 July 16, 2018 12:36PM

Re: redirect based on file content

Dmitry Volyntsev July 16, 2018 02:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 229
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready