title: Configure virtual host for different websites with codeigniter
body: <p>I am having a main portal, now this portal is going to be used by different institutes.</p>
  
  <p>i have configured my apache virtual host as follows :</p>
  
  <p><code>&lt;VirtualHost *&gt;
      DocumentRoot "C:/xampp/htdocs/portal/exp1.php"
      ServerName test.exp1.org
    &lt;Directory "C:/xampp/htdocs/portal/exp1.php"&gt;
      Order allow,deny
      Allow from all
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;</code></p>
  
  <p><code>&lt;VirtualHost *&gt;
      DocumentRoot "C:/xampp/htdocs/portal/exp2.php"
      ServerName test.exp2.org.in
    &lt;Directory "C:/xampp/htdocs/portal/exp2.php"&gt;
      Order allow,deny
      Allow from all
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;</code></p>
  
  <p>Now as you can see i have created different index pages like <strong>exp1.php</strong> , <strong>exp2.php</strong></p>
  
  <p>In each index page i have wrote somethig like this only</p>
  
  <p><code>header("Location: http://test.exp1.org/exp1.php/login/index/1")</code><br>
  so now this will call login controller -> index function -> and parameter as 1.. so based on this parameter i will load a login page accordingly for that particular 1st institutes.</p>
  
  <p>Same for other exp2.php</p>
  
  <p><code>header("Location: http://test.exp2.org/exp2.php/login/index/1")</code><br>
  so now this will call login controller -> index function -> and parameter as 2.. so based on this parameter i will load a login page accordingly for that particular 2nd institutes.</p>
  
  <p>After doing all this when i hit this on browser <strong><a href="http://test.exp1.org/" rel="nofollow noreferrer">http://test.exp1.org/</a></strong> it shows me this error <strong>The page isn't redirecting properly</strong> , actually i want it to load particular view based on parameter passed in url.</p>
  
  <p>this is my folder structure </p>
  
  <p><img src="https://i.stack.imgur.com/Cjspm.png" alt="enter image description here"></p>
  
  <p>know me were is my mistake or what all steps i should perform to make redirect properly</p>