Yoast: RT @idivenow: I just donated to @Yoast for his awesome plugins, you should too: http://t.co/7GTWe1rE <-- THX!! ReTweet Reply

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;

Tags: ,
Category: Serverside
You can skip to the end and leave a response.

Comments are closed.

Comments closed, if you feel you have something to say:
drop me a line.