get rid of index.php - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: get rid of index.php (/showthread.php?tid=68876) |
get rid of index.php - ciadvantage - 09-07-2017 Ok this is sound like a simple as it documents in CI. I tested run on a project that is migrated to Ubuntu 16.04.02 and the ci is under directory like var/www/myproject I made all changes as neccessary per document to .htaccess and it drives me nut as I still cant get rid of index.php within url such as http://myproject.com/showsomething instead it requires http://myproject.com/index.php/showsomething! I am not sure if the Ubuntu 16.04.02 is varied with the config somewhere. I scratched my head do almost all as I can try. All other projects running on Ubuntu 14.04 are fine with htaccess I set up which is same as per doc suggestion Anyone has any ideas? Thanks RE: get rid of index.php - arisroyo - 09-07-2017 Here is my sample .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /openspire/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /openspire/index.php [L] </IfModule> Also make sure that your mod_rewrite is also enabled RE: get rid of index.php - ciadvantage - 09-12-2017 Unfortunately it is still not working, here is my current .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> And runs apache2 -v showing Server version: Apache/2.4.18 (Ubuntu) My app is at var/www/myapp And the config.php has been set up to show no index.php such as $config['index_page'] = ''; Also mod rewrite has been enabled Any help is greatly appreciated Regards PS: I have no issues at all under Ubuntu 14.04 RE: get rid of index.php - ciadvantage - 09-12-2017 OK at last, I found the config issue at apache2.conf. Solved |