Hi,
we have a customer who needs a specific query-string and location
password protected.
The location is protected by LocationMatch containing Basic-Auth.
The setup in our webserver is:
---
<LocationMatch "apps/test">
AuthType Basic
AuthName "Auth-Part"
AuthUserFile /usr/local/apache/conf/.auth1htpasswd
AuthGroupFile /usr/local/apache/conf/.auth1htgroup
<Limit GET POST>
require group authgr1
</Limit>
</LocationMatch>
---
Some Requests do not have the 'apps/test' as prefix but the
query-string contains 'auth=require' which also requires
authentification.
We tried to solve this by using mod_rewrite.
Our setup is:
RewriteCond %{LA-U:REMOTE_USER} =""
RewriteCond %{QUERY_STRING} .*auth=require.*
RewriteRule ^.+$ /apps/test/\? [L,R,NS]
This causes every unauthorized request to be redirected to the protected
area.
---
.
.
.
<Directory /usr/local/apache/htdocs>
RewriteEngine on
RewriteRule ^/?test/?$ /apps/test.jsp?Param1=Value1&Param2=Val2 [QSA,NS]
</Directory>
<LocationMatch "\.jsp">
SetHandler app-handler
</LocationMatch>
.
.
.
<VirtualHost _default_:443>
.
.
<LocationMatch "\.jsp">
SetHandler weblogic-handler
</LocationMatch>
RewriteEngine on
RewriteRule ^/?test/?$ /apps/test.jsp?Param1=Value1&Param2=Val2 [QSA,NS]
</VirtualHost>
---
I have tested the setup with the aktiv RewriteRule in the VirtualHost
and inaktiv in the global Scope.
Apache try to get the file:
/usr/local/apache/htdocs/apps/test.jsp
[test.server/sid#82987b0][rid#8455820/initial] (1) go-ahead with \
/usr/local/apache/htdocs/apps/test.jsp [OK]
But when i deaktivate the RewriteRule in the VirtualHost and aktivate in
the global Scope the apache make the request to the Appserver.
[test.server/sid#8312088][rid#84766d0/initial/redir#1] (1) [per-dir \
/usr/local/apache/htdocs/] pass through /web/sportal3/htdocs/apps
Please can anybody help us.
regards
Alex
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]