Files
webmin/nginx
Ilia Ross 3e4bb23b21 Add return code redirects to Nginx URL rewriting pages
This PR adds a "Redirect all requests" option to the server block and location URL Re-Writing pages in the Nginx Webserver module, backed by the Nginx return directive with a choice of 301, 302, 303, 307 or 308.

The existing rewrite table only offers the redirect and permanent flags, which map to 302 and 301. The other codes requested on the forum are not supported by rewrite at all, so they can only be provided through return.

The new option only manages return directives that are redirects. A bare URL form such as return https://example.com/; is shown as a 302, while non-redirect uses like return 404; are hidden from the page and never modified or removed.

Example of the resulting config for a server block:

return 308 "https://example.com$request_uri";

Fixes https://forum.virtualmin.com/t/137940
2026-09-07 04:01:34 +02:00
..
2026-05-03 17:57:24 -07:00
2026-04-26 21:38:05 +02:00
2026-05-03 17:57:24 -07:00
2026-05-03 17:57:24 -07:00
2026-05-03 17:57:24 -07:00
2026-05-03 17:57:24 -07:00
2026-05-03 17:57:24 -07:00
2026-05-03 17:57:24 -07:00
2026-05-03 17:57:24 -07:00
2026-05-03 17:57:24 -07:00