gpt4 book ai didi

performance - 在 Apache 中使用 .htaccess 文件

转载 作者:行者123 更新时间:2023-12-03 13:29:38 25 4
gpt4 key购买 nike

在 Web 应用程序的所有主目录中使用 .htaccess 和“拒绝所有”指令是否存在任何性能问题? Tks。

最佳答案

使用 .htaccess文件会降低 Apache 的速度。如果可以,请修改主服务器配置文件(通常称为 httpd.conf )

从手册:

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.



http://httpd.apache.org/docs/current/howto/htaccess.html .

另一方面如果您想讨论或争论性能损失与维护简易性的损失,请参阅 Simon Greenhill 的这篇文章|以及他的基准测试结果。

关于performance - 在 Apache 中使用 .htaccess 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17466120/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com