1

RFC 3875 specifies a Local Redirect Response, which, in short says:

If the script sends a "Location:" header with a local path (i.e. starting with /, not with a protocol) and a Status Code 200 header, then the web server should interpret and fulfil this request as if the client had requested the file specified by the "Location:" header.

This works in Apache with the (now deprecated/hard to find mod_fastcgi) and in lighttpd, but not in Apache mod_fcgid.

I couldn't find any information about that for nginx.

1 Answer 1

2

Nginx doesn't support this. But you could use X-Accel-Redirect header for internal redirect

X-Accel-Redirect: /location

http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_ignore_headers

“X-Accel-Redirect” performs an internal redirect to the specified URI;

1
  • Thanks. It's annoying that there is a standard but it's not fully implemented and instead we have to rely on proprietary headers. Commented Oct 14, 2019 at 12:39

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.