<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>archGFX &#187; .htaccess</title>
	<atom:link href="http://archgfx.net/tag/htaccess/feed" rel="self" type="application/rss+xml" />
	<link>http://archgfx.net</link>
	<description>Austin web designer - Adam Freetly</description>
	<lastBuildDate>Thu, 19 Apr 2012 18:01:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>I ♥ Redirection</title>
		<link>http://archgfx.net/blog/2007/geek/i-%e2%99%a5-redirection</link>
		<comments>http://archgfx.net/blog/2007/geek/i-%e2%99%a5-redirection#comments</comments>
		<pubDate>Sun, 09 Sep 2007 20:12:10 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[geekery]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[hotlinking]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[myspace]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://archgfx.net/blog/2007/geek/i-%e2%99%a5-redirection</guid>
		<description><![CDATA[No, not the aging project in my portfolio. The WordPress plugin for managing .htaccess rules without cringing in horror, or wondering whether they're actually working. my first stabs at hacking .htaccess were alright, but it was basically guess &#62; pray &#62; test &#62; fail &#62; repeat. redirection doesn't have any sort of RegEx constructor (it [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://archgfx.net/images/hotlink.jpg" title="hotlinking is bad, mkay?" alt="hotlinking is bad, mkay?" align="right" height="143" width="143" />No, not the <a href="http://archgfx.net/projects/redirection">aging project in my portfolio</a>.  The <a href="http://urbangiraffe.com/plugins/redirection/">WordPress plugin for managing .htaccess rules</a> without cringing in horror, or wondering whether they're actually working.  my first stabs at hacking .htaccess were alright, but it was basically guess &gt; pray &gt; test &gt; fail &gt; repeat.  redirection doesn't have any sort of RegEx constructor (it allows regex, but there's no "click here to redirect anything inside the 'blog' folder).  What it does have are logs.</p>
<p>I've been wondering why my site fares so well in google searches for slayer, but my <a href="http://archgfx.net/blog/2006/music/national-day-of-slayer-june-6-2006-666">post about slayer</a> gets zero traffic.  Apparently it's some danish idiot hotlinking the photo (see chart).  And a couple myspace idiots, not realizing that <em>I got <a href="http://collect.myspace.com/reloc.cfm?c=18&amp;fuseaction=viewImage&amp;imageID=325674&amp;friendID=36787829&amp;id=">the original</a> from myspace</em>, and hotlinking mine, rather than using the original properly.</p>
<p><span id="more-1197"></span><br />
<img src="http://archgfx.net/wp-content/uploads/2007/09/redirection.png" alt="redirection logs" /></p>
<p>So far, I'm realizing that the hotlink ban doesn't prevent the danish forum from from poluting my logs.  I'm also having difficulty determining if the block is actually working.  for everything else, though, the logs work amazingly.  Especially at catching my typos.  <img src='http://archgfx.net/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' /> </p>
<p>The .htaccess rules I'm using are:<br />
<code><br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR]<br />
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?ddforum\.com/ [NC]<br />
RewriteRule \.(gif|jpe?g)$ /images/hotlink.$1 [L]<br />
&lt;/IfModule&gt;</code></p>
<p>Which seems to only make the hotlinked image go away, not actually replace it with my south-park-plus-<a href="http://www.dezinerfolio.com/2007/05/06/ultimate-web-20-layer-styles/">web2.0-gradient</a> image.  boo.</p>
]]></content:encoded>
			<wfw:commentRss>http://archgfx.net/blog/2007/geek/i-%e2%99%a5-redirection/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing Hosts the hard way</title>
		<link>http://archgfx.net/blog/2007/geek/blogging/changing-hosts-the-hard-way</link>
		<comments>http://archgfx.net/blog/2007/geek/blogging/changing-hosts-the-hard-way#comments</comments>
		<pubDate>Sun, 08 Apr 2007 03:14:09 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[archgfx]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">http://archgfx.net/blog/2007/asides/changing-hosts-the-hard-way</guid>
		<description><![CDATA[In case you're wondering where this blog dissappeared to today (and i knowyou weren't), I finally got tired enough of dealing with PHP 4/IIS/the lack of REQUEST_URI that i changed hosts. Thusly, the CNAME record for this blog dissappeared for a few hours. The main reason i switched was that i wanted was to be [...]]]></description>
			<content:encoded><![CDATA[<p>In case you're wondering where this blog dissappeared to today (and i knowyou weren't), I finally got tired <em>enough</em> of dealing with <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym> 4/<acronym title='Internet Infomation Server'><span class='caps'>IIS</span></acronym>/the lack of REQUEST_URI that i changed hosts.   Thusly, the CNAME record for this blog dissappeared for a few hours.</p>
<p>The main reason i switched was that i wanted was to be able to move wordpress into the top level directory, from  <code>/blog/</code>.  so i figured i'd try and do it all in one fell swoop.  what's more fun than trying to do something "mission critical" in a language you've just learned?  so here's what i added to my <code>.htaccess</code> file:</p>
<p><code>&lt;IfModule mod_rewrite.c&gt;<br />
RedirectMatch 301 /blog/index.php/(.*)  /blog/$1<br />
RedirectMatch 301 /blog/wp-content/(.*)  /wp-content/$1<br />
&lt;/IfModule&gt;</code></p>
<p>the first line is for old <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym>'s.  the second line is for anything i uploaded and referenced in a post (especially images).  so far both seem to be working.  (i found the <a href="http://forum.powweb.com/showthread.php?t=71002">RedirectMatch example on this page</a>).  And, since you're reading this, the CNAME record seems to have been set up, although i had to file a support ticket for that.</p>
<p><ins datetime="2007-04-08T15:58:37+00:00"><strong>UPDATE:</strong>  i forgot that i'd also added a prefix to my permalink structure (/blog/) so my redirects were all failing.  should be fixed now (code updated)</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://archgfx.net/blog/2007/geek/blogging/changing-hosts-the-hard-way/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

