I am working on a request handler to route every page call through my index page and have SEO friendly urls.
domain.com/account/settings
this would be easy to map to the correct page but some are more complex when there becomes an ID number or a page number in the uri.
So I see some people will use things like preg_match and cycle through an array of patterns -> uri to get a match which is nice for when paging and id's come into play but from my experience, it seems like running preg_match on an array of say 20 items on every page load is not good for performace.
Please tell me your thought on this?