• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get rid of index.php

#1
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
Reply

#2
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
There are those who tell lies with meaning behind them and those meaning less lies!
Reply

#3
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
Reply

#4
OK at last, I found the config issue at apache2.conf. Solved
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.