apache - Moving CodeIgniter install to a subdomain causes a 500 Internal Server Error -


on new subdomain homepage works fine, else throws 500 internal server error. i'm sure .htaccess issue. have codeigniter-based web app @ giftflow.org , working fine.

web root /var/www/vhosts/giftflow.org/httpdocs

from hosting control panel, created subdomain favorece.giftflow.org , cloned it.

web root /var/www/vhosts/favorece.giftflow.org/httpdocs

when call favorece.giftflow.org browser, index page comes fine, css included, when try navigate other page 500 internal server error. apache error log says:

request exceeded limit of 10 internal redirects due probable configuration error. use 'limitinternalrecursion' increase limit if necessary. use 'loglevel debug' backtrace.

here base_url in codeigniter's application/config/config.php

$config['base_url'] = 'http' . ((isset($_server['https']) && $_server['https'] == 'on') ? 's' : '').'://'.$_server['http_host'].str_replace('//','/',dirname($_server['script_name']).'/'); 

and .htaccess file, in webroot of favorece.giftflow is:

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] 

you're redirecting /giftflow/index.php continually. rewritebase might help, additional flags rewriterule. try:

rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1 [nc,l,qsa] 

additionally, ci auto-detects base_url, you're safe leaving blank. logic you're defining in config.php best placed in main index.php file well.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -