I've setup clean URLs on CodeIgniter through .htaccess and they work fine. Sometimes though CI seems to escape it's clean urls and go back to index.php/ urls. So far I've tracked it down to either:
If you are using mod_rewrite
to remove index.php
from url. You need to change in config
file also to make in redirect or from, urls aren't using index.php
. You need change in config.php
from $config['index_page'] = "index.php"; to $config['index_page'] = "";
$config['index_page'] = "index.php"; to $config['index_page'] = "";
.
Please check the comments in config files above that line:)
On line 29, in config.php file:
$config['index_page'] = 'index.php';
remove the index.php, so it looks like:
$config['index_page'] = '';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.