Trying to remove index.php from URL in codeigniter -
Trying to remove index.php from URL in codeigniter -
this question has reply here:
remove “index.php” url - codeigniter 12 answersi trying remove 'index.php' url. have tried making
$config['uri_protocol'] = 'auto';
as
$config['uri_protocol'] = 'request_uri';
and
$config['index_page'] = 'index.php';
as
$config['index_page'] = '';
and tried putting
rewriteengine on rewritecond $1 !^(index\.php|[javascript / css / image root folder name(s)]|robots\.txt) rewriterule ^(.*)$ /project/index.php/$1 [l]
in .htaccess file, not working me. can please tell me going wrong? in advance..
given you've told me you're using ubuntu...
use .htaccess configuration provided ayman. open terminal , typesudo a2enmod rewrite
enable mod_rewrite
on machine. open 000-default sudo nano /etc/apache2/sites-enabled/000-default
, alter first occurence of allowoverride none
allowoverride all
then restart apache sudo service apache2 restart
.
also use: $config['index_page'] = '';
codeigniter
Comments
Post a Comment