4 ms·
How complicated were the Etsy routes? And were the added overhead and complexity? And I know it is a pain to restart Apache each time there's a change to the
by 127001brewer 12y ago
How complicated were the Etsy routes? And were the added overhead and complexity?
And I know it is a pain to restart Apache each time there's a change to the configuration file, but does anyone know the time differences between a PHP router and Apache rewrites?
- icedchai 12y agoPut it in .htaccess. No restarts needed.
- 127001brewer 12y agoThat's correct - I was thinking of using an Apache VirtualHost file. (Isn't using the .htaccess file slower(?) than using the VirtualHost file?)
- mcfunley 12y agoBasically just "/listing/<a number>/<some ignored text> goes to listing.php", multiplied by a thousand pages or so. There's overhead associated with doing the bookkeeping necessary to compute the route lookups. In practice, it's not that awful to just write a function like "get_url($listing_id)" by hand, and debugging this later is much more straightforward. We didn't need to restart httpd (in development at least) to add to .htaccess. For production deploys maybe we were configured to do this, but that's hidden from development.