title: Moving CodeIgniter install to a subdomain causes a 500 Internal Server Error
body: <p>On my new subdomain the homepage works fine, but everything else throws a 500 Internal Server Error. I'm sure its an <code>.htaccess</code> issue. I have a CodeIgniter-based web app up at GiftFlow.org and working fine.</p>
  
  <p>web root <code>/var/www/vhosts/giftflow.org/httpdocs</code></p>
  
  <p>From my hosting control panel, I created a subdomain favorece.giftflow.org and cloned everything into it.</p>
  
  <p>web root <code>/var/www/vhosts/favorece.giftflow.org/httpdocs</code></p>
  
  <p>When I call <code>favorece.giftflow.org</code> from my browser, the index page comes up fine, CSS included, but when I try to navigate to any other page I get a 500 Internal Server Error. My Apache error log says:</p>
  
  <blockquote>
    <p>Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.</p>
  </blockquote>
  
  <p>Here is my base_url in CodeIgniter's application/config/config.php</p>
  
  <pre><code>$config['base_url'] = 'http' . ((isset($_SERVER['HTTPS']) &amp;&amp; $_SERVER['HTTPS'] == 'on') ? 's' : '').'://'.$_SERVER['HTTP_HOST'].str_replace('//','/',dirname($_SERVER['SCRIPT_NAME']).'/');
  </code></pre>
  
  <p>And my <code>.htaccess</code> file, in the webroot of <code>favorece.giftflow</code> is:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|images|assets|user_guide|robots\.txt)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /giftflow/index.php/$1 [L]
  </code></pre>