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/Bangladesh/Dhaka
Then one can optionally add a suffix making the page appear to be of a certain type.

To do this opene 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/Bangladesh/Dhaka.htm
www.example.com/index.php/Books/Bangladesh/Dhaka.html
www.example.com/index.php/Books/Bangladesh/Dhaka.php
www.example.com/index.php/Books/Bangladesh/Dhaka.asp

Comments

Popular posts from this blog

371 - Ackermann Functions

Create many folder with one click