On 16/04/06, Jeroen Janssen <[EMAIL PROTECTED]> wrote: > I was wondering if anyone has used regular expressions in CakePHP > routing yet. > ... you can specify the regular expressions for matching the :year, > :month and :day for a certain route.
> I want to have urls like > http://myserver/:year/:month/ > but this going to conflict with a route for > http://myserver/:controller/:action/ I had an idea for that one myself last night - and I'd appreciate knowing what the group thinks of it: Put a conditional statement in the routes.php file - looking at $_GET['url'] (or direct at $_SERVER['REQUEST_URI']) and if it's a /:year/:month/ URL, create a '$Route->connect()' to match, else, just use whatever was there (/:controller/:action/). Would that work OK? Alister --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
