Remove index.php from url in codeigniter

From the morning itself i tried in different ways to remove index.php from the url in codeigniter architecture.

Neither ways from all sources in youtube nor some other sites helped me. But finally i got solution & its working well now.


1.activate curl extension in php.ini apache folder->conf->httpd.conf->

remove # from LoadModule rewrite_module modules/

then after search for “Allowoverride” and keep like this AllowOverride All

3. goto root directory of your project..applications->cut .htaccess file from there and copy to root folder(wamp/www/ci/) paste here. Open that htaccess file & edit with this following code:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

4. Navigate to wamp/www/ci/application/config/config.php

modify this $config[‘index_page’] = ‘index.php’; to $config[‘index_page’] = ”;

and add url in $config[‘base_url’] = ‘your url’; you can work your project without using index.php in url. Enjoy 😉


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s