Periods not allowed in CodeIgniter URI?

后端 未结 3 1390
粉色の甜心
粉色の甜心 2021-01-29 05:18

So after reading this question on API versioning, I decided to prefix all my routes with a version number:

http://localhost/api/1.0/user/login

3条回答
  •  既然无缘
    2021-01-29 05:44

    Do you have the (.) in your

    $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
    

    And what is your controller name ?

    I think you must have the controller name in your route before the method name.

    Something like this :

    $route['controller_name/1.0/user/(:any)'] = ...
    

提交回复
热议问题