info@sislbd.com +8801615 900004

Adding a URL Suffix in Codeigniter

Adding a suffix like .html, .htm, .asp, .php etc make a page appear to be a certain type :
In General if a page URL is www.example.com/index.php/Books/Nazrul/Poem
Then one can optionally add a suffix making the page appear to be of a certain type.
To do this open the application/config/config.php file .Then find the line $config[‘url_suffix’] = ”;
Edit your desired extention
Example:$config[‘url_suffix’] = ‘.htm’;
$config[‘url_suffix’] = ‘.html’;
$config[‘url_suffix’] = ‘.php’;
$config[‘url_suffix’] = ‘.asp’;
Then the page URL will be
www.example.com/index.php/Books/Nazrul/Poem.htm
www.example.com/index.php/Books/Nazrul/Poem.html
www.example.com/index.php/Books/Nazrul/Poem.php
www.example.com/index.php/Books/Nazrul/Poem.asp

spectrum