重写日志表示它已被应用......但事实并非如此

时间:2016-12-16 09:07:09

标签: apache .htaccess mod-rewrite url-rewriting debian

我以我的知识结束,对我的IT管理员来说也是如此。

我们设置了一个新的Debian GNU / Linux 8服务器 已安装的apache和所有.. 所有作品除了规则之外。奇怪的是。重写规则日志说他们正在工作但我们打开网址的浏览器没有。

这是我打开xxx.xxx.xxx/bla

时的完整日志
[Fri Dec 16 03:37:04.064896 2016] [rewrite:trace2] [pid 1850] mod_rewrite.c(475): [client xxx.xxx.xxx:22260] xxx.xxx.xxx - - [sccatdev.office.dig/sid#7f35b0df5d20][rid#7f35b0d3c0a0/initial] init rewrite engine with requested uri /bla/
[Fri Dec 16 03:37:04.064936 2016] [rewrite:trace3] [pid 1850] mod_rewrite.c(475): [client xxx.xxx.xxx:22260] xxx.xxx.xxx - - [sccatdev.office.dig/sid#7f35b0df5d20][rid#7f35b0d3c0a0/initial] applying pattern '^/deploy/ajax/(.+)/(\\w+)/(\\w+?)$' to uri '/bla/'
[Fri Dec 16 03:37:04.064944 2016] [rewrite:trace3] [pid 1850] mod_rewrite.c(475): [client xxx.xxx.xxx:22260] xxx.xxx.xxx - - [sccatdev.office.dig/sid#7f35b0df5d20][rid#7f35b0d3c0a0/initial] applying pattern '^/bla/$' to uri '/bla/'
[Fri Dec 16 03:37:04.064950 2016] [rewrite:trace2] [pid 1850] mod_rewrite.c(475): [client xxx.xxx.xxx:22260] xxx.xxx.xxx - - [sccatdev.office.dig/sid#7f35b0df5d20][rid#7f35b0d3c0a0/initial] rewrite '/bla/' -> '/deploy/main.phtml'
[Fri Dec 16 03:37:04.065044 2016] [rewrite:trace2] [pid 1850] mod_rewrite.c(475): [client xxx.xxx.xxx:22260] xxx.xxx.xxx - - [sccatdev.office.dig/sid#7f35b0df5d20][rid#7f35b0d3c0a0/initial] local path result: /deploy/main.phtml
[Fri Dec 16 03:37:04.065062 2016] [rewrite:trace1] [pid 1850] mod_rewrite.c(475): [client xxx.xxx.xxx:22260] xxx.xxx.xxx - - [sccatdev.office.dig/sid#7f35b0df5d20][rid#7f35b0d3c0a0/initial] go-ahead with /deploy/main.phtml [OK]

要进行clerify,我清空了日志。并且在我获得404的页面上有一次exacly,但是日志说它通过了main.phtml低谷..所以... wtf?

为了测试我做了一个简单的bla规则:

<VirtualHost *:80>

        ServerName xxxx.xxx.xxx

        ServerAdmin webmaster@dig.at
        DocumentRoot /data1/www/xxxx.xxx.xx/htdocs
        DirectoryIndex index.html index.phtml index.php
        ErrorLog /data1/www/xxxx.xxx.xx/logs/error.log
        CustomLog /data1/www/xxxx.xxx.xx/logs/access.log combined
        LogLevel alert rewrite:trace8

        #ajax handler for
        RewriteEngine On
        RewriteRule   ^/deploy/ajax/(.+)/(\w+)/(\w+?)$       /deploy/ajax/handler.php?path=$1&class=$2&method=$3 [L,QSA]
        RewriteRule  ^/bla$ /deploy/main.phtml


</VirtualHost>

yess mod rewrite ext is on ...是的,我们跟踪了错误日志中的调用...上面给出了日志...我们尝试了所有google吐出的内容。

服务器是全新安装:

Distributor ID: Debian
Description:    Debian GNU/Linux 8.6 (jessie)
Release:        8.6
Codename:       jessie

0 个答案:

没有答案