This used to be on the php.net reference page, but it’s no longer there. So I’ll post it here for reference.
In order for 301 redirects to work properly in PHP with IE (without showing a Page Not Found error), do the following:
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$url);
header("Connection: close");
- ibo.org error
- Dating Guides for Geeks
- Epson Stylus Color 480SXU Error
- How to plan a LAN party
- Deceptive advertising
- USC Day One
- Call to undefined function: get_currentuserinfo
- Misinformation
- Weird Tab Behavior in Firefox
- Using Google to Redirect
» Four ad units
» 45% of businesses don’t have a Website
» Call to undefined function: get_currentuserinfo
» Comment spam with personality



This works well. Is it the proper way to handle a ‘file not found’? For example;
- user requests download.php?file=abc.doc
- file abc.doc does not exist
- download.php sends a 301, redirects to an error page
This comment has nothing to do with this particular post.
I noticed that you have been blogging about Google.
Guess you should take a look at my two recent posts.
Cheers