httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39625] New: - Mod_Rewrite / Basic Auth bug
Date Sun, 21 May 2006 15:52:04 GMT
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=39625>.
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=39625

           Summary: Mod_Rewrite / Basic Auth bug
           Product: Apache httpd-1.3
           Version: 1.3.34
          Platform: All
               URL: http://forums.site5.com/showthread.php?t=10328
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: john@fayandjohn.com
                CC: john@fayandjohn.com


Hi,

I have a website hosted on a shared server running apache 1.3.34.

I have access to mod_rewrite and basic authentication via the .htaccess 
files

I have found that if I have a global .htaccess file in my public_html 
directory containing some simple mod_rewrite such as:

public_html/.htaccess:

#-----
Options -indexes +FollowSymLinks

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#-----

and then I create a sub-directory, for example test, and protect the 
directory  with basic authentication like:

public_html/test/.htaccess:

#-----
AuthType Basic
AuthName "test"
AuthUserFile "/home/<username>/.htpasswds/test/passwd"
require valid-user
#-----

I then put a test file, for example index.html in this protected directory. 
(ex: public_html/test/index.html)

Then going to a URL like http://domain.com/test/index.html which should get 
re-written to http://www.domain.com/test/index.html and prompt for 
authentication fails immediately with a 401 code.

However, if this sub directory is not protected, then this mod-rewrite code 
works fine.

For a more detailed description, you may read what I have posted at:

http://forums.site5.com/showthread.php?t=10328

Others have reproduced this behavior.  I have not been able to find
documentation stating whether this is expected behavior or not.  I have posted
to the apache user group questioning this and have gotten no response.

Sincerely,

Johnny

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message