我的mod_rewrite规则工作正常,但有时类似的错误出现在我的错误日志中:
File does not exist: /var/www/examplesite/exampleurl
当然,请求的目录不存在,页面正常服务,但我的错误日志越来越多。
什么会导致这些错误?
你应该先改变你的重写引擎的日志级别:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteloglevel
例
RewriteLogLevel 3
这应该有助于诊断重写规则是否存在问题,或者可能是客户端请求的某些其他参数(可能它们具有不正确的主机参数等)。