Custom redirect for one page from https to http with different name.

Francis Daly francis at daoine.org
Tue Jan 9 09:36:37 UTC 2024


On Mon, Jan 08, 2024 at 02:22:14PM -0500, James Read wrote:

Hi there,

> how would I redirect https://example.com/oldname.php to
> http://example.com/newname.php

Within the https server{} block:

    location = /oldname.php { return 301 http://example.com/newname.php; }

should do it.

(Other 30x numbers can work too.)

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list