Mod_rewrite vs php parsing
im working on a little project of mine and need your help deciding if mod_rewrite is performance friendly or parsed every url in php.
URLs almost always have a fixed pattern. very few URLs will have different structures. for example most urls would be dot.com/resource
some others would be
dot.com/other/resource
I expect about 1000 visitors per day to the site. will there be a problem with loading the server?
intuitively I think mod rewrite will work better. but just for this peace of mind, I would like you to introduce you guys. if anyone has done any tests or can point me to the same, an id should be required.
thanks.
a source to share
You can check the following post:
Quoting the accepted answer :
I've used mod_rewrite on sites that are getting millions / hits / month without any significant performance issues. You should know which rewrites are applied first depending on your rules.
Using mod_rewrite is most likely faster than parsing a URL with your current language.
If you're really concerned about performance, don't use htaccess files, but they are slow. Put all your rewrite rules in your Apache config, which is read only once at startup. The htaccess files get re-parsed every request along with every htaccess file in the parent folders.
To add my own, mod_rewrite is definitely capable of handling 1000 visitors per day.
a source to share