<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 01:22:01 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[SitePoint PHP Blog: How to Avoid 404s and Redirect Old URLs in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14897</guid>
      <link>http://www.phpdeveloper.org/news/14897</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog today there's <a href="http://www.sitepoint.com/blogs/2010/08/03/how-to-redirect-old-urls-php/">a new post</a> showing you how to create a 404 page that will redirect people back to the page they're looking for (that used to be there).
</p>
<blockquote>
It's often necessary to reorganize your site and change the URL structure but, assuming you have similar content, users should rarely encounter a "page not found" error. Producing unnecessary 404 pages is one of my <a href="http://www.sitepoint.com/blogs/2010/07/15/top-10-web-development-mistakes/">top 10 development mistakes</a>. In this article, we'll create an automated PHP redirection system that converts old URLs to a new address. It's not production code, but it will illustrate the basics so that you can adapt it for your own website.
</blockquote>
<p>
They walk you through the creation of a 404 error handling PHP page, configuring your server to use it and making the mapping of new URL to old URL. There's even a bit to include if there's not a mapping for a requested page - returning a 301 HTTP header.
</p>]]></description>
      <pubDate>Tue, 03 Aug 2010 14:15:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: Bing Powered 404 for non-WordPress websites]]></title>
      <guid>http://www.phpdeveloper.org/news/14664</guid>
      <link>http://www.phpdeveloper.org/news/14664</link>
      <description><![CDATA[<p>
Following up on his <a href="http://blog.calevans.com/2010/06/01/bing-search-api-wrapper-for-php/">Bing 404 plugin for WordPress</a> article, <i>Cal Evans</i> has put together an example for those <a href="http://www.phparch.com/2010/06/17/bing-powered-404-for-non-wordpress-websites">not using WordPress</a> to accomplish the same thing.
</p>
<blockquote>
I had several people tell me that while they liked the idea, they didn't want to install WordPress just so they can have intelligent 404 errors. Several other people pinged me and suggested a way that you could use the Bing Search API to handle 404's without WordPress. As a public service, I am going to try and bridge the gap between these two groups. Going on leads provided by friends, I have hammered out a solution that works with Apache and PHP. 
</blockquote>
<p>
The solution uses a custom 404 page (as set in Apache) that pulls in the "top ten" links from the current site as reported back by the Bing.com search engine. With the help of <a href="http://bingphp.codeplex.com/">the API</a> making a request and getting back an object to loop through is simple. This could easily be adapted to accept terms based on the content page that they were trying to find or some keywords based on your site's content.
</p>]]></description>
      <pubDate>Thu, 17 Jun 2010 09:10:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 404/403 Website Error Pages With PHP Auto-Mailer]]></title>
      <guid>http://www.phpdeveloper.org/news/12369</guid>
      <link>http://www.phpdeveloper.org/news/12369</link>
      <description><![CDATA[<p>
NETTUTS.com has <a href="http://net.tutsplus.com/tutorials/php/404403-website-error-pages-with-php-auto-mailer/">posted this new tutorial</a> you can use to monitor when and what pages people are trying to get to on your site that aren't found:
</p>
<blockquote>
Although many web developers rely on server logs to keep an eye out for hits on error pages, I'm going to take a different approach by using a PHP generated email. In addition, we will spice up the design a bit, add basic navigation and link to the website sitemap.
</blockquote>
<p>
He briefly explains what error (404/403) pages are and how they work before getting into the mailing portion - a script that, using the <a href="http://phpmailer.codeworxtech.com/index.php?pg=sf&p=dl">phpMailer</a> tool, notifies you when people hit the 404/403 page and includes things like their IP, where they came from and what the requested page was.
</p>]]></description>
      <pubDate>Mon, 20 Apr 2009 07:57:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mark Kimsal's Blog: Is Your MVC MIA When it Comes to 404s?]]></title>
      <guid>http://www.phpdeveloper.org/news/10558</guid>
      <link>http://www.phpdeveloper.org/news/10558</link>
      <description><![CDATA[<p>
In a new post to his blog, <i>Michael Kimsal</i> points out a post from his brother (<i>Mark</i>) that <a href="http://cognifty.com/index.php/blog.entry/id=8/is_your_mvc_mia_when_it_comes_to_404s.html">wonders if your framework</a> handles 404 errors the best/most useful way it can.
</p>
<blockquote>
This post is about the consistency of frameworks. Consistency is key to a low learning curve. [...] Yesterday, my brother asked me how he could capture 404 errors in Cognifty, as he was building an app that relied on dealing with random URL patterns. [...] After talking for a bit, we decided that handing off the request to a standard service (or controller) was the best way to handle this type of "error". He started searching to see if other frameworks had a consistent, or at least documented, way of dealing with missing controllers.
</blockquote>
<p>
In his research he found one framework - the Zend Framework - that handed them by default as an error and passed them off to that handler. <i>Mark</i> notes that, depending on your frame of reference, this may or may not be considered a true error. 
</p>
<p>
His Cognifty framework handles things a bit differently. It allows you to change the presentation handler to redirect to another url if an error like a 404 is thrown - a technically "more correct" way of handling things.
</p>]]></description>
      <pubDate>Tue, 08 Jul 2008 07:51:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: Interesting Bug in the HTTP Streams Wrapper]]></title>
      <guid>http://www.phpdeveloper.org/news/9965</guid>
      <link>http://www.phpdeveloper.org/news/9965</link>
      <description><![CDATA[<p>
<i>Matthew Turland</i> has come across an <a href="http://ishouldbecoding.com/2008/04/10/interesting-bug-in-the-http-streams-wrapper">"interesting bug"</a> in PHP's stream wrappers functionality - some strange 404 or 500 HTTP errors in one of his scripts.
</p>
<blockquote>
I wrote a <a href="http://ishouldbecoding.com/2008/04/user/files/pastebin.phps">small script</a> a while back that's gained a surprising amount of popularity thanks to a plug from the site that it posts to. [...] I learned that this [connection from the script] could be done with streams, I attempted to implement it in that fashion, but ran into strange issues where I would get 404 or 500-level HTTP errors rather than the response I was expected.
</blockquote>
<p>
He eventually found <a href="http://bugs.php.net/bug.php?id=44603">the bug</a> related to his problem (in the 5.2.x branch) but happily notes that it has been corrected and will be patched in the upcoming 5.3 (and 6) branches.
</p>]]></description>
      <pubDate>Mon, 14 Apr 2008 08:49:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Richard Miller's Blog: UPHPU meeting on custom 404 pages]]></title>
      <guid>http://www.phpdeveloper.org/news/4880</guid>
      <link>http://www.phpdeveloper.org/news/4880</link>
      <description><![CDATA[From <i>Richard Miller</i>'s blog today, there's <a href="http://www.richardkmiller.com/blog/archives/2006/02/uphpu-meeting-on-custom-404-pages">a new post</a> with content from the Utah PHP Users Group meeting that's just passed (Feb. 2006) on the topic of custom 404 pages.
<p>
<quote>
<i>
When you try to visit a web page that doesn't exist, the server usually returns a 404 error message - "Page Not Found". At the <a href="http://www.uphpu.org/">Utah PHP Users group</a> meeting last Thursday, Mac Newbold presented on custom 404 pages. Custom 404 pages can help maintain your website branding, help you fix broken links, and help your users find something useful when they don't find what they're looking for.
<p>
Custom 404 pages are even more powerful when you combine them with PHP. I certainly didn't expect the flood of ideas that Mac presented for using custom 404 pages.
</i>
</quote>
<p>
Among <a href="http://www.richardkmiller.com/blog/archives/2006/02/uphpu-meeting-on-custom-404-pages">the suggestions</a> of things to do with the error pages are things like: sending an email when someone gets a 404, search the site for something similar, use it as a redirect for old to new URLs, and more.]]></description>
      <pubDate>Wed, 22 Feb 2006 06:49:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Utah PHP Users Group - February Meeting, 02.16.06 @ 7pm]]></title>
      <guid>http://www.phpdeveloper.org/news/4852</guid>
      <link>http://www.phpdeveloper.org/news/4852</link>
      <description><![CDATA[For the <a href="http://uphpu.org/calendar_event.php?eid=20060215130602266">February 2006 meeting</a>, they Utah PHP Users Group will be talking about Apache 404 handler scripts created in PHP.
<p>
<quote>
<i>
<a href="http://uphpu.org/users.php?mode=profile&uid=14">Mac Newbold</a> will present on PHP 404 handler scripts. Running PHP with Apache has some definite advantages. One that I use frequently is using a PHP script as the 404 document that apache uses when a page can't be found. You can use it for many things. PHP.net uses it to run a site search, to try and find the page you were looking for. You can use it to create "virtual" URLs, where one script handles requests for many different URLs and hands back dynamic content based on the page name. You can even combine it with things like GD to make dynamic images that are created on the fly for each URL.
</i>
</quote>
<p>
<a href="http://uphpu.org/calendar_event.php?eid=20060215130602266">The meeting</a> is happening on the 16th at 7pm MST at the Linux Networx offices. You can <a href="http://www.uphpu.org/profiles.php?uid=411&subject=Meeting%20RSVP&message=I%20will%20be%20attending%20the%20February%202006%20meeting.">RSVP</a> and get a <a href="http://maps.google.com/maps?q=14944+Pony+Express+Rd,+Bluffdale,+UT+84065&spn=.103811,.163404&iwloc=A&hl=en">map to the location</a> from their site...]]></description>
      <pubDate>Thu, 16 Feb 2006 06:37:15 -0600</pubDate>
    </item>
  </channel>
</rss>
