<?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>Web development blog &#187; regular expressions</title>
	<atom:link href="http://simplemediacode.info/tag/regular-expressions/feed/" rel="self" type="application/rss+xml" />
	<link>http://simplemediacode.info</link>
	<description>by Simple Media Code</description>
	<lastBuildDate>Wed, 09 May 2012 12:19:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>How to remove index.html and/or index.php from the URL</title>
		<link>http://simplemediacode.info/remove-index-html-andor-index-php-from-the-url/</link>
		<comments>http://simplemediacode.info/remove-index-html-andor-index-php-from-the-url/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:56:40 +0000</pubDate>
		<dc:creator>umbrovskis</dc:creator>
				<category><![CDATA[Coding web page]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[duplicate content]]></category>
		<category><![CDATA[RegEx]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WPMU]]></category>

		<guid isPermaLink="false">http://simplemediacode.info/?p=8</guid>
		<description><![CDATA[Inspired by my discussion with Kaspars on his homepage konstruktors.com  how to better remove index file. So I'll post both versions, because they use different methods: with and with out RewriteEngine On....]]></description>
			<content:encoded><![CDATA[<p>Inspired by my discussion with Kaspars on his homepage <a title="Konstruktors" href="http://konstruktors.com/blog/web-design/2036-remove-index-html-from-the-url/">konstruktors.com</a> how to better <strong>remove index file</strong>. So I&#8217;ll post both versions, because they use different methods: <span style="text-decoration: underline">with</span> and <span style="text-decoration: underline">with out</span> <strong>RewriteEngine On</strong>.</p>
<p>Here is mine with <strong>RewriteEngine On</strong> (works on this hosting and both versions of GoDaddy hosting plans <em>example1.com</em> and <em>example1.com</em>/<em>example2.com</em>):</p>
<pre class="brush: bash; title: ; notranslate">
# This will remove index.html AND index.php from URL
RewriteCond %{THE_REQUEST} /index.(php|html) HTTP [NC]
RewriteRule (.*)index.(php|html)$ /$1 [R=301,L]
</pre>
<p>And Kaspar&#8217;s method without <strong>RewriteEngine On</strong>:</p>
<pre class="brush: bash; title: ; notranslate">
RewriteEngine On # remove this, if you have it already
RewriteCond %{REQUEST_URI} index.html
RewriteRule ^(.*)index.html$ /$1/ [R=301,L]
</pre>
<p>Purpose of this is to remove <strong>duplicate content</strong> from Internet.</p>
<p>[<strong>Update</strong> on 2010.03.30]</p>
<p>Please keep in mind that some <strong>web applications</strong> still need <strong>index.php</strong> file for <span style="text-decoration: underline">installation scripts</span> as referrers. So it&#8217;s good to keep it in mind and comment these line during installation process if it fails.</p>
<pre class="brush: bash; title: ; notranslate">
# This will remove index.html AND index.php from URL
# RewriteCond %{THE_REQUEST} /index.(php|html) HTTP [NC]
# RewriteRule (.*)index.(php|html)$ /$1 [R=301,L]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://simplemediacode.info/remove-index-html-andor-index-php-from-the-url/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

