httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hay Bruce" <Bruce....@swx.com>
Subject [users@httpd] RewriteRule from within directory with authentication
Date Thu, 10 Oct 2002 10:51:39 GMT
Hello,

I have a single page (perl CGI script) within an authenticated area which has been 
upgraded to some Java code running on another server. I have tried to make this 
transparent to the user so that accessing the new page generates the same
authentication challenge and shows the old URL in the browser. The snippet of
httpd.conf looks like this:

  <Directory /home/hbr/myauthor/swx/author/html/members/protected>
    AuthType            Basic
    AuthName            "Member Section"
    AuthUserFile        /home/swx/admin/passwrd/member.pwd
    require             valid-user
    RewriteEngine       on
    RewriteRule         /members/protected/cgi/system_status.pl http://localhost:52848/swx/members/only/system_status.html
[P]
    
    ErrorDocument 401           /error/msc_401.html
    ErrorDocument 403           /error/msc_403.html
    ErrorDocument 404           /error/msc_404.html
    
  </Directory>

However the rewrite seems to be ignored within the <Directory/> context and
I arrive at the old page.

If I put the RewriteRule in the <VirtualHost /> context it works correctly
but with no authentication challenge :-( I guess it hands the request off
to mod_proxy before determining that the original file was within an
authenticated directory.

Is there some magic incantation of the RewriteRule which will make it work
after the authentication phase?

TIA,

	Bruce

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message