We have just copied a Codeigniter website (from our root domain) to a subdirectory on the same root domain (with all config.php changes made and a new database etc.). However, page links don’t display the individual pages yet the browser simply reloads the index.php page content (as if it’s loading a new page) and changes the URL in the browser window to the correct page.
This is really odd and I’ve spent hours pouring over it, so I’m hoping someone here may be able to give me a starting search point.
For your information, the .htaccess in the subdirectory is:
RewriteEngine on
RewriteRule ^test.php$ mod_rewrite.php
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
This is now sorted after a lot of different attempts!
File
config.phpin root -> application -> config (line 46) was originally:$config['uri_protocol'] = ($_SERVER['SERVER_ADDR'] == '127.0.0.1') ? 'AUTO' : 'ORIG_PATH_INFO';It should be:
$config['uri_protocol'] = ($_SERVER['SERVER_ADDR'] == '127.0.0.1') ? 'AUTO' : 'PATH_INFO';All’s now functioning correctly.