每个文件都由htaccess检查

时间:2014-06-19 04:53:48

标签: apache .htaccess

我从htaccess日志文件中注意到,我的网页<head></head>部分中包含的每个文件也都在检查中。

这是正常的行为,还是我错过了什么?我不明白为什么需要检查这些。这是不必要的。

在下面的日志中,提到并检查了每个.js.css文件,这是不必要的。我该如何阻止这种情况发生?或者就是这样吗?

这不是全部,还有更多我没有贴在这里。

127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1849050/initial] (3) [perdir C:/web/apache/htdocs/test/] strip per-dir prefix: C:/web/apache/htdocs/test/site/scripts/testFramework.js -> site/scripts/testFramework.js
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1849050/initial] (3) [perdir C:/web/apache/htdocs/test/] applying pattern '^' to uri 'site/scripts/testFramework.js'
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1849050/initial] (1) [perdir C:/web/apache/htdocs/test/] pass through C:/web/apache/htdocs/test/site/scripts/testFramework.js
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#18f10d0/initial] (3) [perdir C:/web/apache/htdocs/test/] strip per-dir prefix: C:/web/apache/htdocs/test/site/scripts/testCore.js -> site/scripts/testCore.js
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#18f10d0/initial] (3) [perdir C:/web/apache/htdocs/test/] applying pattern '^' to uri 'site/scripts/testCore.js'
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#18f10d0/initial] (1) [perdir C:/web/apache/htdocs/test/] pass through C:/web/apache/htdocs/test/site/scripts/testCore.js
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1851070/initial] (3) [perdir C:/web/apache/htdocs/test/] strip per-dir prefix: C:/web/apache/htdocs/test/site/scripts/testValidate.js -> site/scripts/testValidate.js
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1851070/initial] (3) [perdir C:/web/apache/htdocs/test/] applying pattern '^' to uri 'site/scripts/testValidate.js'
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1851070/initial] (1) [perdir C:/web/apache/htdocs/test/] pass through C:/web/apache/htdocs/test/site/scripts/testValidate.js
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1849050/initial] (3) [perdir C:/web/apache/htdocs/test/] strip per-dir prefix: C:/web/apache/htdocs/test/site/css/style.css -> site/css/style.css
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1849050/initial] (3) [perdir C:/web/apache/htdocs/test/] applying pattern '^' to uri 'site/css/style.css'
127.0.0.1 - - [19/Jun/2014:09:34:52 +051800] [test.com/sid#7e48f0][rid#1849050/initial] (1) [perdir C:/web/apache/htdocs/test/] pass through C:/web/apache/htdocs/test/site/css/style.css

1 个答案:

答案 0 :(得分:0)

这是正常的,无论如何它都不会为你的服务器增加很多开销。 你可以做的一件事是尽量减少问题&#34;是将所有资产放在一个特定的文件夹中(不是您实际的php / html /无论位于的文件夹中的子文件夹),然后在<Directory>中为每个文件夹创建一个httpd.conf部分。 assets文件夹获得最低限度的检查,您的网站URL仍然可以只应用更复杂的规则。

详细了解此here