Reputation: 432
I just installed bonfire, if I want manage a module I must go to
http://localhost/bonfire/public/index.php/admin/content/blog
I would like to remove index.php on the url and I would like to access my module like.
http://localhost/bonfire/admin/content/blog
Any ideas? i have googling and try any tutorials to remove index.php but it still failed until now
Upvotes: 0
Views: 3027
Reputation:
Below are the steps of removing public and index.php from the website / application
$config[“base_url”] = “”
and $config[“index.php”]=””
With these changes your CI Bonfire application will now have more user friendly urls.
Upvotes: 0
Reputation: 442
Add this code in your .htaccess file and place it on root directory
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
And change in your config file with this
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
Upvotes: 0
Reputation: 943
Do add below code into the your .htaccess file. It will remove public/index.php from url
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/index.php/$1 [L]
</IfModule>
If .htaccess file is not present then do create it. And after adding this code if still not working then contact with server admin to make working this file.
Upvotes: 0