htaccess的重定向性能重定向、性能、htaccess

由网友(少年、不懂爱)分享简介:是htaccess的重定向任何较慢/把更多的压力比Apache的配置文件中的重定向?此外,如何能大一些htaccess的重定向获得开始降低性能才?Are htaccess redirects any slower/put any more strain on Apache than redirects in conf...

是htaccess的重定向任何较慢/把更多的压力比Apache的配置文件中的重定向?此外,如何能大一些htaccess的重定向获得开始降低性能才?

Are htaccess redirects any slower/put any more strain on Apache than redirects in configuration files? Also, how big can a number of redirects in htaccess get before they start decreasing performance?

推荐答案

是的,它减缓了服务器,因为它每一次访问该文件的资源在该目录或访问它们的任何子目录。

Yes, it slows the server because it has to access the file each time a resource in that directory or any subdirectory thereof is accessed.

重定向的量是不相关的,因为主要的性能命中的文件访问本身。这种合理的约束范围内(即5 KB htaccess文件将采取更多或更少的同时比1 KB的一个被解析,不同的故事是1MB的htaccess的,但我从来没有见过的怪物,并希望我永远不会)

The amount of redirects is not relevant, because the main performance hit is the file access itself. This within reasonable constraints (ie a 5 Kb htaccess file will take more or less the same time to be parsed than a 1 Kb one, different story is a 1Mb htaccess, though I've never seen that monstrosity and hope I never will)

阅读全文

相关推荐

最新文章