PHP 301 redirects for Apache and IIS
This one is just here for my own reference, because the default 302 status code just isn't good enough!
PHP 301 for Apache:
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.com/newpage/");
exit;PHP 301 for IIS:
header("Status: 301 Moved Permanently");
header("Location: http://www.example.com/newpage/");
exit;





Liked this post?
Share it!
Tweet
Never miss a post!
Subscribe to the free newsletter now for weekly updates. (No spam, we promise)
Or grab the RSS feed!