• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
codeigniter 3.0-dev - routes urls

#5
[eluser]Unknown[/eluser]
Actually, your fix is the "bug".

There's information on this in the user guide for 3.0-dev - I'll go ahead and copy/paste it here though.

--

Historically, CodeIgniter has always provided the :any wildcard in routing,
with the intention of providing a way to match any character within an URI segment.

However, the :any wildcard is actually just an alias for a regular expression
and used to be executed in that manner as .+. This is considered a bug, as it
also matches the / (forward slash) character, which is the URI segment delimiter
and that was never the intention. In CodeIgniter 3, the :any wildcard will now
represent [^/]+, so that it will not match a forward slash.

There are certainly many developers that have utilized this bug as an actual feature.
If you're one of them and want to match a forward slash, please use the .+
regular expression::

(.+) // matches ANYTHING
(:any) // matches any character, except for '/'


Messages In This Thread
codeigniter 3.0-dev - routes urls - by El Forum - 01-05-2013, 02:40 PM
codeigniter 3.0-dev - routes urls - by El Forum - 01-06-2013, 10:09 AM
codeigniter 3.0-dev - routes urls - by El Forum - 01-06-2013, 10:39 AM
codeigniter 3.0-dev - routes urls - by El Forum - 01-06-2013, 11:18 AM
codeigniter 3.0-dev - routes urls - by El Forum - 01-10-2013, 04:36 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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