<?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>Shared Know How &#187; error</title>
	<atom:link href="http://www.sharedknowhow.com/tag/error/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharedknowhow.com</link>
	<description>Howto: fix, find, use, make &#38; do it guide</description>
	<lastBuildDate>Mon, 17 Jan 2011 08:37:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>handy .htaccess settings I use in a row</title>
		<link>http://www.sharedknowhow.com/2008/04/handy-htaccess-settings-i-use/</link>
		<comments>http://www.sharedknowhow.com/2008/04/handy-htaccess-settings-i-use/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 20:14:50 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.sharedknowhow.com/?p=6</guid>
		<description><![CDATA[I always keep on reinventing the wheel when it comes to .htaccess settings like for automatic redirect to https://, utf-8 character settings or custom error documents. Here are some settings I use. Automatic redirect to ssl host https: In case you want to automatically redirect to https to make sure people use the secure connection [...]]]></description>
			<content:encoded><![CDATA[<p>I always keep on reinventing the wheel when it comes to .htaccess settings like for automatic redirect to https://, utf-8 character settings or custom error documents. Here are some settings I use.</p>
<p><span id="more-6"></span></p>
<h2>Automatic redirect to ssl host https:</h2>
<p>In case you want to automatically redirect to https to make sure people use the secure connection put the following code in your .htaccess.</p>
<p>Always make sure to use %{HTTPS} off as condition and not any port number.<br />
<code class="php"><br />
RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}</code></p>
<h2>Custom "page not found" or other error pages</h2>
<p><code class="php"> ErrorDocument 404 http://errorurl/<br />
//or the following<br />
ErrorDocument 404 /edocs/404.htm</code></p>
<h2>Make sure host uses UTF-8</h2>
<p>if you create websites for others and use a lot of different hosting providers you may notice not everyone uses utf-8. This might create some difficulties with certain characters. Adding the following line to your .htaccess makes sure your host uses utf-8.</p>
<p><code class="php">AddDefaultCharset utf-8</code></p>
<h2>Code I always put on top to prevent problems with some hosts</h2>
<p>-Indexes makes sure your folders aren't indexable from the web. This might prevent some unwanted peeking around on your <a title="server colocation" href="http://hosting.com/colocation/" target="_blank">server colocation</a>.<br />
<code class="php"><br />
Options -Indexes +SymLinksIfOwnerMatch</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sharedknowhow.com/2008/04/handy-htaccess-settings-i-use/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

