简体   繁体   中英

How to change PHP extension in Codeigniter

I want to change index.php into index.abc (or index.aspx). I tried to change $config['index_page'], but can't. I only can remove index.php and add .abc behind url through $config['url_suffix'] = '.abc'; Please help me.

$config['index_page'] = 'index.abc';

you can use this suffix in

/application/config/config.php

$config['url_suffix'] = '.abc';

Use this in your .htaccess and it should work

RewriteEngine on
RewriteRule ^(.*)\.abc$ $1.php

and leave this one as it is / was

$config['index_page'] = 'index.php';

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM