I am working on some routes for my CodeIgniter application and I need to declare "catch-all" / with the exception of one regex. Any route that does not start with "ajax /" should be redirected to the "main" router. For instance:
$route['regexmagichere'] = "main";
So, this definitely goes beyond my regular expression skills, and I need help. The regular expression should return true for all lines that do not start with 'ajax /', for example:
$string_one = "ajax/someotherstuffhere";
$string_two = " ajax/test";
$string_three = "somestuffhere";
Here $ string_one will be the only one returning false. Thank you for your time!
source
share