Thousands of readers can be wrong

A Dreamer, a Photographer, a Musician, a Webdesigner... sometimes a Java coder too: I am Niccolò Favari and this blog is about New Media, Creativity, Business, Communication, Entrepreneurship and lots more. Boring stuff indeed, because I am a very boring dude.

Well, what's the point? I have no point. I just keep writing. And it feels good.

RSS Feeds Icon

LinkedIn Icon

Facebook Icon

Permanent Redirect (301) in plain PHP

Three simple lines made it


// Permanent redirection
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.flipthedolphin.com/");
exit();
?>

I just copied and pasted the above lines of code inside an empty file and renamed it to index.php, then putting it inside my /wordpress/ folder made the trick: no more 404 errors if someone visit www.flipthedolphin.com/wordpress/.

I found an interesting way to make redirects in ASP/VBscript, Javascript, ColdFusion and so on. Interesting stuff if you’re receiving many 404 from visitors that did not update their bookmarks (or if you’re losing readers because you changed the wordpress/feeds folder). Here it is: Permanent Redirect with HTTP 301.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*