I have used apache + htaccess for matching URL's for a long time now. We are likely to be upgrading our entire platform soon and I am wondering if switching to URL matching in php might have any performance impact.

We're using Apache at this time (clearly) though URL's being matched up in PHP would free us to understand more about options for example nginx+php.

Would this be considered a bad or good idea?

Matching web addresses in php is extremly enjoyable after apache - you are able to debug your pattern, and everything works not surprisingly. During my MVC framework I've router, that suits $_SERVER['REQUEST_METHOD'] . ':' . $_SERVER['REQUEST_URI'] against route regexps - very comfortable for Search engine optimization needs.

The only real hint: don't use php to complement and output static files - it's very slow. You will find not one other impacts on performance.

We did exactly this, setup a table in MySQL of URL's and PHP would perform a preg_match against each URL rule before determining what thing to do. Only then do we were built with a single mod_rewrite rule that pushes every URL through one script.

This labored ideal for us and provides us a lot more versatility without needing to create 100s of physcial files for various rules.

We receive 15m unique hits per month and haven't experienced any difficulties with this, supplying your using appropriate caching from the URL's.

Apache has become a performance impact itself. As lengthy when you are utilizing it, you might worry of not one other impacts.