<?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: CodeIgniter htaccess	</title>
	<atom:link href="https://www.farinspace.com/codeigniter-htaccess-file/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.farinspace.com/codeigniter-htaccess-file/</link>
	<description>Practical Real World Web Development</description>
	<lastBuildDate>Wed, 30 Sep 2015 19:45:50 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>
		By: hey		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-33690</link>

		<dc:creator><![CDATA[hey]]></dc:creator>
		<pubDate>Tue, 20 Aug 2013 15:17:36 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-33690</guid>

					<description><![CDATA[Hello,

Where should we put this .htaccess file(right next to index.php in the application folder ?)

Same question for those using codeigniter HMVC.

Thank you.]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>Where should we put this .htaccess file(right next to index.php in the application folder ?)</p>
<p>Same question for those using codeigniter HMVC.</p>
<p>Thank you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ano		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-30870</link>

		<dc:creator><![CDATA[ano]]></dc:creator>
		<pubDate>Thu, 30 May 2013 22:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-30870</guid>

					<description><![CDATA[By reversing the following line :
RewriteRule ^(welcome(/index)?&#124;index(\.php)?)/?$ / [L,R=301]

to something like :
RewriteRule ^/?$ /index.php [L,R=301]

Note: in &quot;/index.php&quot; you might remove the slash :unsure:]]></description>
			<content:encoded><![CDATA[<p>By reversing the following line :<br />
RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]</p>
<p>to something like :<br />
RewriteRule ^/?$ /index.php [L,R=301]</p>
<p>Note: in &#8220;/index.php&#8221; you might remove the slash :unsure:</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mark LaDoux		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-30864</link>

		<dc:creator><![CDATA[Mark LaDoux]]></dc:creator>
		<pubDate>Thu, 30 May 2013 18:57:45 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-30864</guid>

					<description><![CDATA[I&#039;ve got an improvement, reflecting current Apache rules --

change

# If your default controller is something other than
# &quot;welcome&quot; you should probably change this
RewriteRule ^(welcome(/index)?&#124;index(\.php)?)/?$ / [L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]

to read as

### Remove index.php from URL
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php(/[^\s\?]+)? [NC]
RewriteRule ^ %1 [L,R=301]

# If your default controller is something other than
# &quot;welcome&quot; you should probably change this
RewriteRule ^(welcome(/index)?)/?$ / [L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]

This way, the index.php gets removed whenever it&#039;s included in the URL, your current rules only remove it when it&#039;s mentioned after /start/ which should produce a 404 error, and therefore defeating the purpose.

My method will remove it whenever it&#039;s called after whatever RewriteBase is set to.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got an improvement, reflecting current Apache rules &#8212;</p>
<p>change</p>
<p># If your default controller is something other than<br />
# &#8220;welcome&#8221; you should probably change this<br />
RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]<br />
RewriteRule ^(.*)/index/?$ $1 [L,R=301]</p>
<p>to read as</p>
<p>### Remove index.php from URL<br />
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php(/[^\s\?]+)? [NC]<br />
RewriteRule ^ %1 [L,R=301]</p>
<p># If your default controller is something other than<br />
# &#8220;welcome&#8221; you should probably change this<br />
RewriteRule ^(welcome(/index)?)/?$ / [L,R=301]<br />
RewriteRule ^(.*)/index/?$ $1 [L,R=301]</p>
<p>This way, the index.php gets removed whenever it&#8217;s included in the URL, your current rules only remove it when it&#8217;s mentioned after /start/ which should produce a 404 error, and therefore defeating the purpose.</p>
<p>My method will remove it whenever it&#8217;s called after whatever RewriteBase is set to.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: rot		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-29264</link>

		<dc:creator><![CDATA[rot]]></dc:creator>
		<pubDate>Sat, 13 Apr 2013 01:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-29264</guid>

					<description><![CDATA[@sachin: you might replace [R=301,L] with [L]]]></description>
			<content:encoded><![CDATA[<p>@sachin: you might replace [R=301,L] with [L]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: rot		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-29263</link>

		<dc:creator><![CDATA[rot]]></dc:creator>
		<pubDate>Sat, 13 Apr 2013 01:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-29263</guid>

					<description><![CDATA[REDIRECTING OLD DYNAMIC URLS :

Here&#039;s a really usefull tip when you need to redirect old dynamic urls to new ones, specialy when there are GET vars in old urls (codeigniter refuse GET vars when using default config, and a simple Redirect 301 will fail)

Here&#039;s the solution :
1. sample old url : page.php?id=1234&#038;lang=en
2. sample new url : newpage/action/1234#contact

.htaccess :
RewriteCond %{REQUEST_URI} ^/page\.php$ [NC]
RewriteCond %{QUERY_STRING} id=([0-9]+)&#038;lang=en$ [NC]
RewriteRule ^(.*)$ en/newpage/action/%1#contact? [NE,R=301,L] 

Note that [NE] will allow to include an anchor in the destination url and the last caracter &quot;?&quot; will prevent query string to interfere with in the dest url.

Hope it&#039;ll save someone&#039;s time !

------------------- 

@SACHIN: 
RewriteRule ^folder/?$ folder/index.html [R=301,L]

should do the trick]]></description>
			<content:encoded><![CDATA[<p>REDIRECTING OLD DYNAMIC URLS :</p>
<p>Here&#8217;s a really usefull tip when you need to redirect old dynamic urls to new ones, specialy when there are GET vars in old urls (codeigniter refuse GET vars when using default config, and a simple Redirect 301 will fail)</p>
<p>Here&#8217;s the solution :<br />
1. sample old url : page.php?id=1234&amp;lang=en<br />
2. sample new url : newpage/action/1234#contact</p>
<p>.htaccess :<br />
RewriteCond %{REQUEST_URI} ^/page\.php$ [NC]<br />
RewriteCond %{QUERY_STRING} id=([0-9]+)&amp;lang=en$ [NC]<br />
RewriteRule ^(.*)$ en/newpage/action/%1#contact? [NE,R=301,L] </p>
<p>Note that [NE] will allow to include an anchor in the destination url and the last caracter &#8220;?&#8221; will prevent query string to interfere with in the dest url.</p>
<p>Hope it&#8217;ll save someone&#8217;s time !</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- </p>
<p>@SACHIN:<br />
RewriteRule ^folder/?$ folder/index.html [R=301,L]</p>
<p>should do the trick</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sachin Sharma		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-28926</link>

		<dc:creator><![CDATA[Sachin Sharma]]></dc:creator>
		<pubDate>Wed, 03 Apr 2013 11:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-28926</guid>

					<description><![CDATA[I have a HTML website with an issue:

Google Webmaster Tool shows duplicate pages:

www.domain.com/folder/
www.domain.com/folder/index.html

I want only www.domain.com/folder/index.html to be visible and accessible. How can this be done with .htaccess ?]]></description>
			<content:encoded><![CDATA[<p>I have a HTML website with an issue:</p>
<p>Google Webmaster Tool shows duplicate pages:</p>
<p><a href="http://www.domain.com/folder/" rel="nofollow ugc">http://www.domain.com/folder/</a><br />
<a href="http://www.domain.com/folder/index.html" rel="nofollow ugc">http://www.domain.com/folder/index.html</a></p>
<p>I want only <a href="http://www.domain.com/folder/index.html" rel="nofollow ugc">http://www.domain.com/folder/index.html</a> to be visible and accessible. How can this be done with .htaccess ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thomas		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-27536</link>

		<dc:creator><![CDATA[Thomas]]></dc:creator>
		<pubDate>Tue, 19 Feb 2013 08:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-27536</guid>

					<description><![CDATA[How to remove the controller name from the url]]></description>
			<content:encoded><![CDATA[<p>How to remove the controller name from the url</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ridgerunner		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-26248</link>

		<dc:creator><![CDATA[ridgerunner]]></dc:creator>
		<pubDate>Thu, 13 Dec 2012 21:17:20 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-26248</guid>

					<description><![CDATA[Your first &quot;welcome&quot; rule has a problem. It matches &quot;welcomeindex&quot; and &quot;welcomeindex.php&quot; (and not &quot;welcome/index.php&quot;]]></description>
			<content:encoded><![CDATA[<p>Your first &#8220;welcome&#8221; rule has a problem. It matches &#8220;welcomeindex&#8221; and &#8220;welcomeindex.php&#8221; (and not &#8220;welcome/index.php&#8221;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: paras		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-25960</link>

		<dc:creator><![CDATA[paras]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 06:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-25960</guid>

					<description><![CDATA[how to search index file function in route directory.
please solve the problem and get answer please quickly.]]></description>
			<content:encoded><![CDATA[<p>how to search index file function in route directory.<br />
please solve the problem and get answer please quickly.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jp		</title>
		<link>https://www.farinspace.com/codeigniter-htaccess-file/#comment-25575</link>

		<dc:creator><![CDATA[jp]]></dc:creator>
		<pubDate>Mon, 22 Oct 2012 06:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://farinspace.com/?p=147#comment-25575</guid>

					<description><![CDATA[hi.
I tried this but it keeps redirecting me to http://www.domain.tld/
any help
thanks]]></description>
			<content:encoded><![CDATA[<p>hi.<br />
I tried this but it keeps redirecting me to <a href="http://www.domain.tld/" rel="nofollow ugc">http://www.domain.tld/</a><br />
any help<br />
thanks</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
