Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Routing fails with UPPERCASE characters
  • Hi, I got a problem with token when tried to use UPPERCASE characters in url :D

    For example,

    When I type this into browser address :

    http://LOGIN.SOMEURL.COM/id/SWS


    ==> ErrorException [ Notice ]: Undefined variable: token


    If I don't use UPPER characters, it will works fine!


    Howdy strange problem... What should I do?
  • HarroHarro
    Accepted Answer
    FuelPHP routing is case sensitive by default, TOKEN !== token.

    You can make routing case insensitive in your application config file, in the routing section. See fuel/core/config/config.php if you don't have this section in your app config, and copy it over before you change it.

    This is an application wide setting, so if you only want this for specific routes, you'll have to add a route with a regex for it so it matches any case.
  • Thanks you very much !

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion