Case Insensitive Routing in CodeIgniter

前端 未结 8 1046
南笙
南笙 2021-01-13 21:46

I\'ve written this in the CodeIgniter\'s routers.

$route[\'companyname\'] = \"/profile/1\";

This is working fine but when I type \"CompanyN

8条回答
  •  清歌不尽
    2021-01-13 22:19

    Use Router:

    $urix = substr(strtolower($_SERVER['REQUEST_URI']), 1);
    
    $route["(?i)$urix"] = $urix;
    

    Solution for all Case Insensitive Routings..

提交回复
热议问题