[UPHPU] Rewriting Apache URLs

Jon Jensen jon at jenseng.com
Mon Aug 7 09:10:08 MDT 2006


> One suggest i would give is to be conservative in your 
> efforts and don't try to use mod_rewrite for everything. it 
> is an expensive process.

mod_rewrite really only affects performance if you are using it in .htaccess
files. For that matter, using .htaccess files for any reason should be
avoided if you are able to change the Apache config file. The reason is that
on every single request, Apache will read/parse every .htaccess file from
the document root to the directory you are in so that it knows what
directives to apply. That can turn into quite a lot of overhead for a simple
GET request.

By moving everything to the Apache config files, all of those directives are
loaded into memory just once -- when the server starts -- making the
performance impact of such directives negligible even on a high traffic
site.

Jon



More information about the UPHPU mailing list