Force 302 to 301 redirect

tconlon nginx-forum at forum.nginx.org
Sat Jan 11 13:35:02 UTC 2020


Hi,

Found it, 

if ($page == 'index.php') {
          header("Location: ". $toUrl);

probably need something like this

<?php
// 301 Moved Permanently
header("Location: ",TRUE,301);

thanks

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286700,286708#msg-286708



More information about the nginx mailing list