<?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>FettesPS &#187; modwrite</title>
	<atom:link href="http://www.fettesps.com/tag/modwrite/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fettesps.com</link>
	<description>Fettes Programming Solutions</description>
	<lastBuildDate>Sun, 22 Jan 2012 18:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Protecting Your .svn Folders With .htaccess</title>
		<link>http://www.fettesps.com/protecting-your-svn-folders-with-htaccess/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=protecting-your-svn-folders-with-htaccess</link>
		<comments>http://www.fettesps.com/protecting-your-svn-folders-with-htaccess/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 00:51:12 +0000</pubDate>
		<dc:creator>FettesPS</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod rewrite]]></category>
		<category><![CDATA[modwrite]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.fettesps.com/?p=591</guid>
		<description><![CDATA[Subversion is a powerful tool. Not only does it allow multiple developers to collaborate on a project, but it allows you to easily deploy your projects to the production server. If you are using a checked out repository on your production server, rather than an exported copy, it is crucial that you protect your hidden [...]]]></description>
			<content:encoded><![CDATA[<p>Subversion is a powerful tool.  Not only does it allow multiple developers to collaborate on a project, but it allows you to easily deploy your projects to the production server.  If you are using a checked out repository on your production server, rather than an exported copy, it is crucial that you protect your hidden .svn directories.  </p>
<p>If you do not take measures to protect these hidden folders then your website will become extremely susceptible to attack.  Your .svn folders contain the pristine copies of every file with a .base extension.  This means that someone with a little know-how can navigate through your .svn folders and download your config files and obtain sensitive information such as your database password.  On top of that, they can simply steal all of your code and reproduce your site elsewhere with their name on the bottom.</p>
<p>So how do you protect your site against these attacks?  If you have access to the domain&#8217;s configuration files you can deny access there by adding the following lines:</p>
<pre class="brush: bash; title: ; notranslate">&lt;Directory ~ “^\.svn”&gt;
Deny from all
&lt;/Directory&gt;</pre>
<p>If you are on a shared hosting plan and do not have access to these configuration files, then you can make use of mod_rewrite to block access to the subversion directories.  Open up your .htaccess file in your favourite text editor and include the following:</p>
<pre class="brush: bash; title: ; notranslate">RewriteEngine on

# Hide .SVN Folders
RewriteRule ^(.*/)*\.svn/ / [F,L]</pre>
<p>With these in place your website is now much a safer place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fettesps.com/protecting-your-svn-folders-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

