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

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

Code:
$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 
Code:
$routes->get('abc', 'Homepage::show_categories_page/abc');

I noticed at CI 3,it can be add suffix though application/config/config.php :
Code:
$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.
Reply

#2
Do you have any susggest?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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