Iftakharul Alam
Iftakharul Alam

Reputation: 3321

CodeIgniter url_suffix issue

I am working a CodeIgniter project version 2.5. I add a url suffix in config.php as $config['url_suffix'] = '.asp';. When I go to https://localhost:81/project/sample it works fine but if I go to https://localhost:81/project/sample.asp it returns The requested resource /project/sample.asp was not found on this server. What's wrong here. Thank you.

Upvotes: 0

Views: 155

Answers (1)

Abdulla Nilam
Abdulla Nilam

Reputation: 38652

In config.php, you can add any of url_suffix

$config['url_suffix'] = '.asp';
$config['url_suffix'] = '.html';
$config['url_suffix'] = '.php';

This will work fine when you use it.

Still failed

Goto -> routes.php

$route['project/sample'] = 'project/sample.asp';

Upvotes: 1

Related Questions