[UPHPU] .htaccess performance hit

Jonathan Duncan jonathan at bluesunhosting.com
Wed May 7 17:53:45 MDT 2008


On 07 May 2008, at 15:08, Wade Preston Shearer wrote:

> I have been told that using .htaccess files (specifically, mod  
> rewrites in .htaccess files) can have a significant negative impact  
> on performance. Is this .htaccess use period or just heavy .htaccess  
> use? Meaning, is there a difference between one rewrite in  
> an .htaccess file over two hundred? Note that I am not asking about  
> the effect on performance with rewrites in general, just the use  
> of .htaccess files. Will reducing the contents of an .htaccess file  
> help or will I have to disable .htaccess use altogether to see any  
> change? It seems to me that you would have to disabled .htaccess use  
> entirely in order to see a performance increase since Apache would  
> have to still traverse the web tree checking for .htaccess files  
> even if they don't exist or even if they are light. Will moving all  
> of my rewrites into httpd.conf and leaving .htaccess use enabled so  
> that I can toss a quite rule in once in a while without having to  
> restart Apache negate the performance improvement that I am seeking?
>

This should not be too hard for you to test.  Take several times of  
site loading as it currently is.  Then turn off .htaccess and throw  
all your mod_rewrite stuff in httdp.conf and take times again.   
Compare.  If you do this, I would be interested in the results.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2466 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20080507/2eb2bef0/smime.bin


More information about the UPHPU mailing list