Multiple CI application in a sub-domain <p>I am new to Apache environment. Preferably I do not want .htaccess file, but I think I have not choice. My application runs without problem in my notebook which is windows environment using WAMPSERVER. But when I deploy to hosting server which uses Apache, I face some problems. I am not sure the following structure is correct for CodeIgniter application. Following is the directory structure in hosting server... </p> <pre><code>httodocs/ /survey /admin /config &lt;-- $route['default_controller'] = "admin"; /controllers /models /views /... /statistic /config &lt;-- $route['default_controller'] = "statistic"; /controllers /models /views /... /mySurvey /config &lt;-- $route['default_controller'] = "mySurvey"; /controllers /models /views /... /css /images /scripts /system /... /index.php &lt;-- $application_folder = 'mySurvey'; /admin.php &lt;-- $application_folder = 'admin'; /Statistic.php &lt;-- $application_folder = 'statistic'; </code></pre> <p>What I did was just duplicate the Application folder and rename to admin, statistic and mySurvey respectively, I set the default controller as stated above. </p> <p>all application <code>base_url() = 'http://survey.myhost.com'</code> which is a sub domain under myhost.com</p> <p>The root index.php is actually CI application environment which allow user to go to mySurvey application by default, when they enter "http://survey.myhost.com".</p> <p>From the first page on, when I access <a href="http://survey.myhost.com/index.php/mySurvey/index/0" rel="nofollow">http://survey.myhost.com/index.php/mySurvey/index/0</a> I got error:</p> <pre><code>`The specified CGI application misbehaved by not retruning a complete set of HTTP headers.` </code></pre> <p>The same message shows when I access <code>http://survey.myhost.com/admin.php/admin/login</code> or <code>http://survey.myhost.com/statistic.php?statistic/chart/1</code> (note that I also do use query string for my application)</p> <p>Obviously, these have to do with the route. I do not have any .htaccess file at the server because WAMP does not need it, Appreciate if anyone can advice where can I put the .htaccess file and what is the correct mod-rewrite for the structure above and is this structure appropriate.</p> <p>Regards,</p> <p>KK Gian</p>