- 论坛徽章:
- 0
|
RewriteEngine On
RewriteRul (.*) /web/$1
我通过rewriteLog查询,发现并不是这句运行一次就结束。比如 请求/bbs.php 变成了/web/bbs.php 这个时候其实已经得到答案,但还会继续INTERNAL REDIRECT ,又开始了新一论的RewriteRule.这样显然进入死循环。
1,是这么执行的吗?一定要自己来避免循环吗?还是可以什么地方配置.请大家说说看.
2.我发现我的环境里 $1不包含 / 字符,这跟手册似乎不一样,你们呢。Server version: Apache/2.2.8 (Unix)
日志如下
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826de20/initial] (3) [perdir /www/jiguang/] strip per-dir prefix: /www/jiguang/bbs.php -> bbs.php
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826de20/initial] (3) [perdir /www/jiguang/] applying pattern '.*' to uri 'bbs.php'
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826de20/initial] (2) [perdir /www/jiguang/] rewrite 'bbs.php' -> '/web/bbs.php'
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826de20/initial] (1) [perdir /www/jiguang/] internal redirect with /web/bbs.php [INTERNAL REDIRECT]
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826fb90/initial/redir#1] (3) [perdir /www/jiguang/] add path info postfix: /www/jiguang/web -> /www/jiguang/web/bbs.php
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826fb90/initial/redir#1] (3) [perdir /www/jiguang/] strip per-dir prefix: /www/jiguang/web/bbs.php -> web/bbs.php
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826fb90/initial/redir#1] (3) [perdir /www/jiguang/] applying pattern '.*' to uri 'web/bbs.php'
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826fb90/initial/redir#1] (2) [perdir /www/jiguang/] rewrite 'web/bbs.php' -> '/web/web/bbs.php'
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#826fb90/initial/redir#1] (1) [perdir /www/jiguang/] internal redirect with /web/web/bbs.php [INTERNAL REDIRECT]
.......
......
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#827f288/initial/redir#10] (3) [perdir /www/jiguang/] add path info postfix: /www/jiguang/web -> /www/jiguang/web/web/web/web/web/web/web/web/web/web/bbs.php
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#827f288/initial/redir#10] (3) [perdir /www/jiguang/] strip per-dir prefix: /www/jiguang/web/web/web/web/web/web/web/web/web/web/bbs.php -> web/web/web/web/web/web/web/web/web/web/bbs.php
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#827f288/initial/redir#10] (3) [perdir /www/jiguang/] applying pattern '.*' to uri 'web/web/web/web/web/web/web/web/web/web/bbs.php'
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#827f288/initial/redir#10] (2) [perdir /www/jiguang/] rewrite 'web/web/web/web/web/web/web/web/web/web/bbs.php' -> '/web/web/web/web/web/web/web/web/web/web/web/bbs.php'
192.168.2.75 - - [17/Apr/2008:16:39:53 +0500] [192.168.2.121/sid#80c3678][rid#827f288/initial/redir#10] (1) [perdir /www/jiguang/] internal redirect with /web/web/web/web/web/web/web/web/web/web/web/bbs.php [INTERNAL REDIRECT] |
|