DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30035>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30035 mod_rewrite and access restricted directories not working Summary: mod_rewrite and access restricted directories not working Product: Apache httpd-1.3 Version: 1.3.29 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: mod_rewrite AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] let me give you an example: a plain apache installation, with one sub directory (foo/) in the document root. foo should be access restricted, so there is an foo/.htaccess: AuthType Basic Require valid-user AuthName "restricted directory" AuthUserFile .htpasswd now comes mod_rewrite into the game. I want to redirect http://thishost/foo/ to http://somewhereelse/foo/, so there is a /.htaccess: ErrorDocument 403 error.html RewriteEngine on RewriteBase / # fancy RewriteConds RewriteCond %{REQUEST_URI} ^/foo/ RewriteRule (.*) http://somewhereelse/$1 [R=301,L] this configuration yields strange responses: GET /foo HTTP/1.0 User-Agent: w3m/0.5.1 Accept: text/*, image/* Accept-Encoding: gzip, compress, bzip, bzip2, deflate Accept-Language: en;q=1.0 Host: thishost HTTP/1.1 301 Moved Permanently Date: Sun, 11 Jul 2004 11:28:32 GMT Server: Apache/1.3.29 (Unix) WWW-Authenticate: Basic realm="restricted directory" Location: http://thishost/error.html Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>301 Moved Permanently</TITLE> </HEAD><BODY> <H1>Moved Permanently</H1> The document has moved <A HREF="http://thishost/error.html">here</A>.<P> </BODY></HTML> Now this response appears to be a mixture of the mod_rewrite result (html code 301) and the auth stuff (location /error.html). I'm not sure whether that's a mod_rewrite bug, or something else, however, I expect either a correct redirection or a correct access denied response - this mixture is just wrong --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
