View Single Post
  #2 (permalink)  
Old 07-11-2008, 04:06 AM
Tekerson Tekerson is offline
Member
 
Join Date: Jul 2008
Posts: 40
Default

Instead of multiple routing rules, you can probably handle use a more advanced regex. Making the different sections optional. Something like:
Code:
archive/(?:([12][0-9]{3})(?:_([^_]+)(?:_([0-9]{1,2}))?)?)?$
Then setting defaults for the year, month and day values if they aren't present should do the trick.
__________________
Brenton Alker
Brisbane, Australia

http://blog.tekerson.com/
Reply With Quote