• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use routing to add .html suffix?

Hi everybody.
I tried to use routing to add .html suffix .In router.php :

$routes->get('abc.html', 'Homepage::show_categories_page/abc');

I hope when I go to URL : mydomain.com/abc.html ,it would swich to above routes.But it redirect to / (index.php)

When I tried to remove .html suffix.It works perfectly 
$routes->get('abc', 'Homepage::show_categories_page/abc');

I noticed at CI 3,it can be add suffix though application/config/config.php :
$config['url_suffix'] = '.html';

But I found nothing similar as that file in CI 4.My question is how to use routing to add .html suffix?

Thank you all for your help.

Do you have any susggest?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.