我对本地机器上的 reqrite 规则发疯了……
我什至启用了重写日志,这是我从应该重写的 url 上的单个页面加载中得到的:
ip - - [21/May/2013:08:13:18 +0200] [scxx/sid#7f6580ce32b8][rid#7f65810069e0/initial] (2) init rewrite engine with requested uri /catdev/sc/eprocure/ajax/ArticleSearch/SearchEngine/GetInitialData
ip - - [21/May/2013:08:13:18 +0200] [scxx/sid#7f6580ce32b8][rid#7f65810069e0/initial] (3) applying pattern '^/catdev/sc/eprocure/ajax/(.+)/(\w+)/(\w+?)$' to uri '/catdev/sc/eprocure/ajax/ArticleSearch/SearchEng$
ip - - [21/May/2013:08:13:18 +0200] [scxx/sid#7f6580ce32b8][rid#7f65810069e0/initial] (2) rewrite '/catdev/sc/eprocure/ajax/ArticleSearch/SearchEngine/GetInitialData' -> '/catdev/sc/eprocure/ajax/handler.php?pa$
ip - - [21/May/2013:08:13:18 +0200] [scxx/sid#7f6580ce32b8][rid#7f65810069e0/initial] (3) split uri=/catdev/sc/eprocure/ajax/handler.php?path=ArticleSearch&class=SearchEngine&method=GetInitialData -> uri=/catde$
ip - - [21/May/2013:08:13:18 +0200] [scxx/sid#7f6580ce32b8][rid#7f65810069e0/initial] (2) local path result: /catdev/sc/eprocure/ajax/handler.php
ip - - [21/May/2013:08:13:18 +0200] [scxx/sid#7f6580ce32b8][rid#7f65810069e0/initial] (1) go-ahead with /catdev/sc/eprocure/ajax/handler.php [OK]
该路径被正确找到,但它仍然没有加载它应该加载的页面。我不知道为什么!
错误日志向我显示了这一点。
[Tue May 21 08:13:18 2013] [error] [client xxx.xxx.xxx.xx] File does not exist: /catdev/sc/eprocure
现在我在我的 apache 配置中有这些重写规则:
<VirtualHost *:80>
ServerAdmin webmaster@xxx.at
ServerName xxx
DocumentRoot /data1/www/somewherefarbeyond/ssl-htdocs
<Directory /data1/www/somewherefarbeyond/ssl-htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /data1/www/somewherefarbeyond/logs/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /data1/www/somewherefarbeyond/logs/access.log combined
RewriteEngine On
RewriteRule ^/catdev/sc/eprocure/ajax/(.+)/(\w+)/(\w+?)$ /catdev/sc/eprocure/ajax/handler.php?path=$1&class=$2&method=$3 [L]
RewriteLog /data1/www/somewherefarbeyond/logs/accessREWRITE.log
RewriteLogLevel 9
</VirtualHost>
somone 可以在这件事上解释一下吗?
我正在尝试的网址是 xxx/catdev/sc/eprocure/ajax/ArticleSearch/SearchEngine/GetInitialData
注意 xxx 是来自我的开发服务器的手动 owerwriten 域,并且 ips 被隐藏了。