<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Beautification Revisited	</title>
	<atom:link href="https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s/feed" rel="self" type="application/rss+xml" />
	<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s</link>
	<description>A running commentary of occasionally interesting things — from Mike Davidson.</description>
	<lastBuildDate>Thu, 26 May 2016 06:34:40 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>
		By: Keith		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-429</link>

		<dc:creator><![CDATA[Keith]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-429</guid>

					<description><![CDATA[Thanks for the followup Mike -- but I wish you&#039;d have posted it yesterday!  I could have used some of the info.  I spent a few hours working on similar issues myself and came to a similar conclusion with a bit of a different implementation.  I looked at the regex solution to remove the file extension and it would have been quite a bit of work to get going and because I need to redirect all of my old entries I didn&#039;t want to mess with adding even more stuff to my .htaccess.

But the end result is almost the same. Also, I use MTShortTitle to do the same thing you do with the keywords.  What&#039;s nice is that it allows you to keep your keyword functionality.  &lt;a href=&quot;http://www.dribin.org/dave/software/movabletype/&quot; rel=&quot;nofollow&quot;&gt;Read more here.&lt;/a&gt; It might serve you a bit better.  I&#039;ve migrated my entries, changed the url scheme and will have my site up on the new server soon.

(You&#039;ll be happy to note that the comment lag is gone!)

I&#039;m going to look into your smart 404 and see if maybe I can use it in conjunction with what I&#039;ve got already.  Might work well, so thanks for that.]]></description>
			<content:encoded><![CDATA[<p>Thanks for the followup Mike &#8212; but I wish you&#8217;d have posted it yesterday!  I could have used some of the info.  I spent a few hours working on similar issues myself and came to a similar conclusion with a bit of a different implementation.  I looked at the regex solution to remove the file extension and it would have been quite a bit of work to get going and because I need to redirect all of my old entries I didn&#8217;t want to mess with adding even more stuff to my .htaccess.</p>
<p>But the end result is almost the same. Also, I use MTShortTitle to do the same thing you do with the keywords.  What&#8217;s nice is that it allows you to keep your keyword functionality.  <a href="http://www.dribin.org/dave/software/movabletype/" rel="nofollow">Read more here.</a> It might serve you a bit better.  I&#8217;ve migrated my entries, changed the url scheme and will have my site up on the new server soon.</p>
<p>(You&#8217;ll be happy to note that the comment lag is gone!)</p>
<p>I&#8217;m going to look into your smart 404 and see if maybe I can use it in conjunction with what I&#8217;ve got already.  Might work well, so thanks for that.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Patrick H. Lauke		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-430</link>

		<dc:creator><![CDATA[Patrick H. Lauke]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-430</guid>

					<description><![CDATA[on the issue of extensionless urls: there&#039;s a method that avoids re-write rules completely, and works for anything and everything (you can use it for .php, .html, .jpg...anything)

simply enable multiviews (either in httpd.conf or .htaccess)

Options +MultiViews

careful though, this can potentially have interesting side effects (read: rewrite rule loops) if combined with other existing heavy rewrite rules (particularly the ones you describe above, where it matches some name to the same name + extension)]]></description>
			<content:encoded><![CDATA[<p>on the issue of extensionless urls: there&#8217;s a method that avoids re-write rules completely, and works for anything and everything (you can use it for .php, .html, .jpg&#8230;anything)</p>
<p>simply enable multiviews (either in httpd.conf or .htaccess)</p>
<p>Options +MultiViews</p>
<p>careful though, this can potentially have interesting side effects (read: rewrite rule loops) if combined with other existing heavy rewrite rules (particularly the ones you describe above, where it matches some name to the same name + extension)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike D.		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-431</link>

		<dc:creator><![CDATA[Mike D.]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-431</guid>

					<description><![CDATA[Keith,

Sorry.  I would have posted it yesterday but Ashley&#039;s tattoo scar hadn&#039;t quite healed yet.

One thing that might help you with your redirect issue is to create an entirely new archive folder for your new entries.  My old folder was &quot;archives&quot; and my new folder is &quot;archive&quot;, so I can throw an .htaccess file in the old folder to handle the redirects without it affecting the new folder.]]></description>
			<content:encoded><![CDATA[<p>Keith,</p>
<p>Sorry.  I would have posted it yesterday but Ashley&#8217;s tattoo scar hadn&#8217;t quite healed yet.</p>
<p>One thing that might help you with your redirect issue is to create an entirely new archive folder for your new entries.  My old folder was &#8220;archives&#8221; and my new folder is &#8220;archive&#8221;, so I can throw an .htaccess file in the old folder to handle the redirects without it affecting the new folder.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Keith		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-432</link>

		<dc:creator><![CDATA[Keith]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-432</guid>

					<description><![CDATA[That&#039;s an idea.  I think my biggest issue with the methods you talk about was the use or regex.  I&#039;m just too damn lazy to get in there and monkey with all of my templates.  I think what I have will work well.

Now, about your custom smart 404.  I&#039;m thinking it might be a good idea to combine what you&#039;ve got with something a bit more traditional.  I mean there could be many cases when someone hits the 404 with something that doesn&#039;t return any search results.  Might it be a good idea, in addition to the custom heading also add some custom 404 text and recent entries or something?

So your 404 might read like:

Looking for something?

(search results if any)

Nothing in there?

Here are my last 5 entries (via mt).

If you still can&#039;t find what you&#039;re looking for, blah, blah, yackety schmakity...]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s an idea.  I think my biggest issue with the methods you talk about was the use or regex.  I&#8217;m just too damn lazy to get in there and monkey with all of my templates.  I think what I have will work well.</p>
<p>Now, about your custom smart 404.  I&#8217;m thinking it might be a good idea to combine what you&#8217;ve got with something a bit more traditional.  I mean there could be many cases when someone hits the 404 with something that doesn&#8217;t return any search results.  Might it be a good idea, in addition to the custom heading also add some custom 404 text and recent entries or something?</p>
<p>So your 404 might read like:</p>
<p>Looking for something?</p>
<p>(search results if any)</p>
<p>Nothing in there?</p>
<p>Here are my last 5 entries (via mt).</p>
<p>If you still can&#8217;t find what you&#8217;re looking for, blah, blah, yackety schmakity&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Snook		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-433</link>

		<dc:creator><![CDATA[Jonathan Snook]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-433</guid>

					<description><![CDATA[One small thing to note... I think your RSS feed is still including the .php extension. Nice informative article... your 404 technique could also have a positive effect on slightly truncated URLs (due to improper cut and pasting) because the search will more than likely redirect to the proper article. A bonus in my books.]]></description>
			<content:encoded><![CDATA[<p>One small thing to note&#8230; I think your RSS feed is still including the .php extension. Nice informative article&#8230; your 404 technique could also have a positive effect on slightly truncated URLs (due to improper cut and pasting) because the search will more than likely redirect to the proper article. A bonus in my books.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike D.		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-434</link>

		<dc:creator><![CDATA[Mike D.]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-434</guid>

					<description><![CDATA[Keith,

The other good way I&#039;ve found to get the extensions off of your files in MT is to hack the &quot;util.pm&quot; file so that if your preferred extension field in the MT configuration screen is blank, no extension is written (currently, it defaults to .html if left blank).  This is a pretty easy solution.  I went with the RegEx one instead because I have a common MT template module (the header) which appears on every page so adding the RegEx line was just a change to one file.

As for your search results suggestion... yes... definitely.  More text is necessary.  I&#039;m also going to throw a prepopulated search field in there at the top so you can adjust your search.]]></description>
			<content:encoded><![CDATA[<p>Keith,</p>
<p>The other good way I&#8217;ve found to get the extensions off of your files in MT is to hack the &#8220;util.pm&#8221; file so that if your preferred extension field in the MT configuration screen is blank, no extension is written (currently, it defaults to .html if left blank).  This is a pretty easy solution.  I went with the RegEx one instead because I have a common MT template module (the header) which appears on every page so adding the RegEx line was just a change to one file.</p>
<p>As for your search results suggestion&#8230; yes&#8230; definitely.  More text is necessary.  I&#8217;m also going to throw a prepopulated search field in there at the top so you can adjust your search.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Keith		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-435</link>

		<dc:creator><![CDATA[Keith]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-435</guid>

					<description><![CDATA[Yeah, RegEx might be easier than I&#039;m making it out to be.  I&#039;ve just spent so much time in MT this last week I&#039;m being lazy.

Well, I&#039;d be interested in seeing what you come up with.  The prepopulated search is a great idea...  

Also, a stupid, but related, PHP question (I&#039;m still pretty new to PHP) -- in your search.php template, how are you using that smart404=1 paramater to display the 404 title?]]></description>
			<content:encoded><![CDATA[<p>Yeah, RegEx might be easier than I&#8217;m making it out to be.  I&#8217;ve just spent so much time in MT this last week I&#8217;m being lazy.</p>
<p>Well, I&#8217;d be interested in seeing what you come up with.  The prepopulated search is a great idea&#8230;  </p>
<p>Also, a stupid, but related, PHP question (I&#8217;m still pretty new to PHP) &#8212; in your search.php template, how are you using that smart404=1 paramater to display the 404 title?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anil		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-436</link>

		<dc:creator><![CDATA[Anil]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-436</guid>

					<description><![CDATA[Thanks for the update! Interesting that you independently arrived at the same conclusion that Jason Kottke did a while back. (Me? I&#039;m lazy, so I just use dirified post titles. They don&#039;t change *that* frequently once I&#039;ve finished my initial edits.)

I&#039;m gonna see if we can&#039;t edit the defaults in MT so that a blank file extension actually means &lt;em&gt;no&lt;/em&gt; extension and then HTML is prefilled by default. That makes more sense anyway.]]></description>
			<content:encoded><![CDATA[<p>Thanks for the update! Interesting that you independently arrived at the same conclusion that Jason Kottke did a while back. (Me? I&#8217;m lazy, so I just use dirified post titles. They don&#8217;t change *that* frequently once I&#8217;ve finished my initial edits.)</p>
<p>I&#8217;m gonna see if we can&#8217;t edit the defaults in MT so that a blank file extension actually means <em>no</em> extension and then HTML is prefilled by default. That makes more sense anyway.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike D.		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-437</link>

		<dc:creator><![CDATA[Mike D.]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-437</guid>

					<description><![CDATA[Anil,

Yeah, the web is getting a lot more like print now in that most &quot;new ideas&quot; have already been thought of independently by other people. That&#039;s one of the things that really bores me about the print design and advertising worlds.  Thanks for looking into the default file extension improvement for MT... I agree, seems logical.

Keith,

The code which goes in the search page to catch the &quot;smart404=1&quot; is:


&#060;h2&#062;
&#060;?
if ($_GET[&#039;smart404&#039;] == &#039;1&#039;) {
echo &quot;Were You Looking for Something?&quot;;
} else {
echo &quot;Search Results&quot;;
}
?&#062;
&#060;/h2&#062;


That&#039;s it...]]></description>
			<content:encoded><![CDATA[<p>Anil,</p>
<p>Yeah, the web is getting a lot more like print now in that most &#8220;new ideas&#8221; have already been thought of independently by other people. That&#8217;s one of the things that really bores me about the print design and advertising worlds.  Thanks for looking into the default file extension improvement for MT&#8230; I agree, seems logical.</p>
<p>Keith,</p>
<p>The code which goes in the search page to catch the &#8220;smart404=1&#8221; is:</p>
<p>&lt;h2&gt;<br />
&lt;?<br />
if ($_GET[&#8216;smart404&#8217;] == &#8216;1&#8217;) {<br />
echo &#8220;Were You Looking for Something?&#8221;;<br />
} else {<br />
echo &#8220;Search Results&#8221;;<br />
}<br />
?&gt;<br />
&lt;/h2&gt;</p>
<p>That&#8217;s it&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Keith		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-438</link>

		<dc:creator><![CDATA[Keith]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-438</guid>

					<description><![CDATA[Thanks Mike.  I&#039;ll play around with that.  I really need to get myself a good PHP book.]]></description>
			<content:encoded><![CDATA[<p>Thanks Mike.  I&#8217;ll play around with that.  I really need to get myself a good PHP book.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Goldfinch		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-439</link>

		<dc:creator><![CDATA[Goldfinch]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-439</guid>

					<description><![CDATA[Mike,

This is a very helpful post (like most of the things I read in your blog) but I think you might want to reconsider how you&#039;re handling the 404 errors.

IMHO I don&#039;t think you should be automatically redirecting people or even replacing the location in the address bar.

You should be informing people that they&#039;ve made a mistake or that the page has moved but you should still give them the chance to correct that mistake themselves.

I.e. if someone mistypes a URL, they should be able to correct their mistake in the address bar without having to re-type the whole thing. This isn&#039;t possible with your current setup.

I&#039;m afraid I can&#039;t offer any pointers to any PHP code that would help you do this though, but I thought it was worth mentioning.]]></description>
			<content:encoded><![CDATA[<p>Mike,</p>
<p>This is a very helpful post (like most of the things I read in your blog) but I think you might want to reconsider how you&#8217;re handling the 404 errors.</p>
<p>IMHO I don&#8217;t think you should be automatically redirecting people or even replacing the location in the address bar.</p>
<p>You should be informing people that they&#8217;ve made a mistake or that the page has moved but you should still give them the chance to correct that mistake themselves.</p>
<p>I.e. if someone mistypes a URL, they should be able to correct their mistake in the address bar without having to re-type the whole thing. This isn&#8217;t possible with your current setup.</p>
<p>I&#8217;m afraid I can&#8217;t offer any pointers to any PHP code that would help you do this though, but I thought it was worth mentioning.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike D.		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-440</link>

		<dc:creator><![CDATA[Mike D.]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-440</guid>

					<description><![CDATA[UP

1.  Jonathan: Thanks.  Feeds are now fixed. Sorry to everyone who thinks I now have 15 new articles  :)

2.  I&#039;m thinking about making Ashley Judd a permanent fixture on the smart404-induced search results page.

3.  Goldfinch: Being able to retype a URL would be nice and I think I have a way to accomplish your suggestion without losing automatic rerouting.  Later today, I should have an enhancement posted whereby I write out a slim horizontal div at the very top of the page containing the previously typed URL and a &quot;Go&quot; button.  This will appear completely outside the design, as a Google toolbar would.]]></description>
			<content:encoded><![CDATA[<p>UP</p>
<p>1.  Jonathan: Thanks.  Feeds are now fixed. Sorry to everyone who thinks I now have 15 new articles  :)</p>
<p>2.  I&#8217;m thinking about making Ashley Judd a permanent fixture on the smart404-induced search results page.</p>
<p>3.  Goldfinch: Being able to retype a URL would be nice and I think I have a way to accomplish your suggestion without losing automatic rerouting.  Later today, I should have an enhancement posted whereby I write out a slim horizontal div at the very top of the page containing the previously typed URL and a &#8220;Go&#8221; button.  This will appear completely outside the design, as a Google toolbar would.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Brad Daily		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-441</link>

		<dc:creator><![CDATA[Brad Daily]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-441</guid>

					<description><![CDATA[Wouldn&#039;t you know it, the &lt;b&gt;one time&lt;/b&gt; my wife is looking over the shoulder when I am reading blogs I come here, and she thinks I am looking at &quot;questionable content&quot;. You should have seen me trying to explain it was an article on dirified URLs, Regex, and Rewrite rules....not a chance.

Good article nonetheless Mike...]]></description>
			<content:encoded><![CDATA[<p>Wouldn&#8217;t you know it, the <b>one time</b> my wife is looking over the shoulder when I am reading blogs I come here, and she thinks I am looking at &#8220;questionable content&#8221;. You should have seen me trying to explain it was an article on dirified URLs, Regex, and Rewrite rules&#8230;.not a chance.</p>
<p>Good article nonetheless Mike&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Schontzler		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-442</link>

		<dc:creator><![CDATA[David Schontzler]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-442</guid>

					<description><![CDATA[Mike -

You can accomplish the don&#039;t-change-the-url-for-multiple by just outputting $full_code to the page instead of redirecting to it. The added advantage is that you won&#039;t be performing the search twice!

I would suggest automatic redirection to single-page matches though and consider adding a &lt;em&gt;you got here the &quot;wrong way&quot;&lt;/em&gt; bit. Often times, a visitor arrives at a page through a link that they have no control over and you want search engines to update their links anyhow.]]></description>
			<content:encoded><![CDATA[<p>Mike &#8211;</p>
<p>You can accomplish the don&#8217;t-change-the-url-for-multiple by just outputting $full_code to the page instead of redirecting to it. The added advantage is that you won&#8217;t be performing the search twice!</p>
<p>I would suggest automatic redirection to single-page matches though and consider adding a <em>you got here the &#8220;wrong way&#8221;</em> bit. Often times, a visitor arrives at a page through a link that they have no control over and you want search engines to update their links anyhow.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ben		</title>
		<link>https://mikeindustries.com/blog/archive/2004/08/smart-urls-and-smarter-404s#comment-443</link>

		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Tue, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-443</guid>

					<description><![CDATA[Just FYI, adding a trailing slash (as I probably would if typing a URL from memory) kills your system.]]></description>
			<content:encoded><![CDATA[<p>Just FYI, adding a trailing slash (as I probably would if typing a URL from memory) kills your system.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
