Re: [users@httpd] mod_rewrite and Location(Match)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Lazic wrote:
in VirtualHost-Contex but i loose the user after the
[INTERNAL REDIRECT].

I tried to reproduce it (very limited because you posted only some parts of the RewriteLog, so it's hard to reconstruct the exact processing), but it works for me.
I attached the RewriteLog.

Used in virtual host:
RewriteEngine on
RewriteCond %{LA-U:REMOTE_USER} =""
RewriteCond %{QUERY_STRING} auth=require
RewriteRule ^/ - [F,NS]
DocumentRoot is /var/www

<LocationMatch "protect/test">
  AuthName "test"
  AuthType Basic
  AuthUserFile ...
  Require valid-user
</LocationMatch>

<Directory "/var/www">
  RewriteEngine on
  RewriteRule ^protect/test/?$ /protect/test.php [L]
  Options FollowSymlinks
</Directory>

Request was /protect/test, rewritten to /protect/test.php (physically /var/www/protect/test.php) in per-dir context.

I can't reproduce jsp settings here.

--
Robert
# inital request
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dca9a0/initial] (2) init rewrite engine with requested uri /protect/test/
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dca9a0/initial] (3) applying pattern '^/' to uri '/protect/test/'
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dc0978/subreq] (2) init rewrite engine with requested uri /protect/test/
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dc0978/subreq] (1) pass through /protect/test/
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dca9a0/initial] (5) lookahead: path=/protect/test/ var=REMOTE_USER -> val=
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dca9a0/initial] (4) RewriteCond: input='' pattern='=""' => matched
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dca9a0/initial] (4) RewriteCond: input='' pattern='auth=require' => not-matched
127.0.0.3 - - [31/Mar/2006:00:52:27 +0200] [example.com/sid#dd9658][rid#dca9a0/initial] (1) pass through /protect/test/
# server responded with Statuscode 401
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (2) init rewrite engine with requested uri /protect/test/
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (3) applying pattern '^/' to uri '/protect/test/'
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc0978/subreq] (2) init rewrite engine with requested uri /protect/test/
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc0978/subreq] (1) pass through /protect/test/
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (5) lookahead: path=/protect/test/ var=REMOTE_USER -> val=qw
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (4) RewriteCond: input='qw' pattern='=""' => not-matched
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (1) pass through /protect/test/
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (3) [per-dir /var/www/] add path info postfix: /var/www/protect/test -> /var/www/protect/test/
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (3) [per-dir /var/www/] strip per-dir prefix: /var/www/protect/test/ -> protect/test/
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (3) [per-dir /var/www/] applying pattern '^protect/test/?$' to uri 'protect/test/'
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (2) [per-dir /var/www/] rewrite protect/test/ -> /protect/test.php
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc2980/initial] (1) [per-dir /var/www/] internal redirect with /protect/test.php [INTERNAL REDIRECT]
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (2) init rewrite engine with requested uri /protect/test.php
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (3) applying pattern '^/' to uri '/protect/test.php'
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc6990/subreq] (2) init rewrite engine with requested uri /protect/test.php
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc6990/subreq] (1) pass through /protect/test.php
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (5) lookahead: path=/protect/test.php var=REMOTE_USER -> val=qw
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (4) RewriteCond: input='qw' pattern='=""' => not-matched
127.0.0.3 - - [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (1) pass through /protect/test.php
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (3) [per-dir /var/www/] strip per-dir prefix: /var/www/protect/test.php -> protect/test.php
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (3) [per-dir /var/www/] applying pattern '^protect/test/?$' to uri 'protect/test.php'
127.0.0.3 - qw [31/Mar/2006:00:52:30 +0200] [example.com/sid#dd9658][rid#dc1cb8/initial/redir#1] (1) [per-dir /var/www/] pass through /var/www/protect/test.php

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux