(I use it in my sites-enabled/ folder because adding .htaccess files are slowing down apache and my server is not very powerful :P)
You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any directive that you can include in a .htaccess file is better set in a Directory block, as it will have the same effect with better performance. httpd.apache.org/docs/2.4/howto/ht...
The httpd.conf is parsed one time. If you use .htaccess it'll get hit every time something is called. That'll cause a fairly large performance hit that will just get worse with increasing requests. stackoverflow.com/a/25064109/6813732
hello, the good news is you can manage it wherever you want, but do you have any figures or test results for the performances? I'd be curious to know why .htaccess would slow down the entire architecture, especially your number of hits.
I haven't done any test on my server, but I will quote another SO answer:
Also, when [.htaccess is] enabled the server will take a potential performance hit. The reason is because, every server request, if .htaccess support is enabled, when Apache goes to fetch the requested file for the client, it has to look for a .htaccess file in every single directory leading up to wherever the file is stored. stackoverflow.com/a/29114826/6813732
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here's my config on my website:
And it works well :)
(I use it in my
sites-enabled/
folder because adding.htaccess
files are slowing down apache and my server is not very powerful :P)hello, the good news is you can manage it wherever you want, but do you have any figures or test results for the performances? I'd be curious to know why
.htaccess
would slow down the entire architecture, especially your number of hits.I haven't done any test on my server, but I will quote another SO answer: