mod_rewrite mysterious subreq

蹲街弑〆低调 提交于 2019-12-23 19:23:25

问题


Seems like some apache module is interfering with my request uris as it suffixes ".html" to it.

My rewrite log:

172.16.103.1 - - [08/Mar/2012:14:56:33 +0100] [www.example.org/sid#7ff723575b58][rid#7ff724b4fc58/initial] (1) pass through /folder/subfolder/
172.16.103.1 - - [08/Mar/2012:14:56:33 +0100] [www.example.org/sid#7ff723575b58][rid#7ff724b42468/subreq] (3) [perdir /srv/www/html/project/] add path info postfix: /srv/www/html/project/folder/subfolder.html -> /srv/www/html/trustedshops/folder/subfolder.html/
172.16.103.1 - - [08/Mar/2012:14:56:33 +0100] [www.example.org/sid#7ff723575b58][rid#7ff724b42468/subreq] (3) [perdir /srv/www/html/project/] strip per-dir prefix: /srv/www/html/project/folder/subfolder.html/ -> folder/subfolder.html/

This merely happens on our development servers. But It's hard do compare the whole apache config. Any ideas which module could be responsible?


回答1:


  • Turn off MultiViews as this generates subrequests
  • Ditto DirectoryIndex with a list of possiblities.
  • Use the NS flag on your rewrite rules, or

    RewriteCond %{IS_SUBREQ}  t
    RwriteRule  ^             -   [L]
    


来源:https://stackoverflow.com/questions/9618865/mod-rewrite-mysterious-subreq

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!