【发布时间】:2010-09-19 23:17:55
【问题描述】:
我运行以下网址:
http://localsite/index.php/foo/bar
index.php 被执行并输出变量:
$_SERVER[SCRIPT_FILENAME] = E:/path/to/file/index.php
Apache 中的 mod_rewrite 已禁用。
谁重写了规则?
或者会发生什么?
index.php 是如何找到的?为什么 apache 决定运行它?
我的配置: Windows Vista、Apache Apache/2.2.14 (Win32) PHP/5.3.1(带 php 模块)。
(问题实际上是在 mod_rewrite 之前重写了规则 - 这是启用 mod_rewrite 时。这导致 RewriteCond %{REQUEST_FILENAME} !-f 始终为 false,因为 /foo/bar 在 RewriteCond 之前被修剪)。
【问题讨论】:
标签: php apache mod-rewrite