<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged enhance</title>
<link>https://www.question2answer.org/qa/tag/enhance</link>
<description>Powered by Question2Answer</description>
<item>
<title>Suggestion for .htaccess enhancement</title>
<link>https://www.question2answer.org/qa/11588/suggestion-for-htaccess-enhancement</link>
<description>

&lt;p&gt;
	I would suggest to enhance .htaccess a little bit.
&lt;br&gt;
	My proposition:&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;# The following IF prevents &quot;Error 500; Internal Server Error&quot; if the server doesn't support rewriteBase.&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;AddType x-mapp-php5 .php&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;#AddHandler application/x-httpd-php5 .php&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;DirectoryIndex index.php&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;RewriteEngine On&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;RewriteBase /&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;RewriteCond %{REQUEST_URI} ^(.*)//(.*)$&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;RewriteRule . %1/%2 [R=301,L]&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;RewriteCond %{REQUEST_FILENAME} !-f&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;RewriteCond %{REQUEST_FILENAME} !-d&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;RewriteRule ^.*$ index.php?qa-rewrite=$0&amp;amp;%{QUERY_STRING} [L]&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#006400;&quot;&gt;&amp;lt;/IfModule&amp;gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	As long as&amp;nbsp;&lt;span style=&quot;color: rgb(0, 100, 0);&quot;&gt;RewriteBase &lt;/span&gt;should have always &lt;span style=&quot;color:#006400;&quot;&gt;/&lt;/span&gt; as a value (even if the script is placed in some subfolder), &quot;&lt;span style=&quot;color:#006400;&quot;&gt;your-sub-folder&quot;&lt;/span&gt; can be dropped.&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	Any more suggestions / upgrades ?&lt;/div&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/11588/suggestion-for-htaccess-enhancement</guid>
<pubDate>Fri, 30 Dec 2011 12:31:47 +0000</pubDate>
</item>
</channel>
</rss>