陌生的localhost行为

我试图在本地域的一部分上实现HTTP摘要authentication。 我在Mac OSX Lion上使用MAMP。 MAMP使用端口8888,所以我可以导航到我的域在http://localhost:8888/myDomainhttp://127.0.0.1:8888/myDomain 。 这两个工作正常的域的未经身份validation的部分。 但是,如果我导航到受保护的地址,会发生一些奇怪的事情。 如果我使用本地主机,那么摘要authentication工作绝对好,但如果我使用127.0.0.1,则authentication保持失败。 我一直没有能够看到任何有关的我的Apache日志文件或我的PHP日志文件,可能会build议任何事情。 我检查了我的.htaccess文件和httpd.conf文件,并再次看不到任何看起来可能会导致问题的东西。 任何人都可以提出任何我可以尝试的地方,或者我应该去尝试和诊断问题? 我一直在运行查尔斯代理来帮助debugginghttp请求,但查尔斯是否正在运行似乎并不重要,我仍然遇到同样的问题。

编辑:这是我的.htaccess

  <IfModule mod_rewrite.c> # Make sure directory listing is disabled Options +FollowSymLinks -Indexes RewriteEngine on # NOTICE: If you get a 404 play with combinations of the following commented out lines #AllowOverride All #RewriteBase /wherever/pyro/is # Restrict your site to only one domain # !important USE ONLY ONE OPTION # Option 1: To rewrite "www.domain.com -> domain.com" uncomment the following lines. #RewriteCond %{HTTPS} !=on #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] #RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines. #RewriteCond %{HTTPS} !=on #RewriteCond %{HTTP_HOST} !^www\..+$ [NC] #RewriteCond %{HTTP_HOST} (.+)$ [NC] #RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L] # Remove index.php from URL #RewriteCond %{HTTP:X-Requested-With} !^XMLHttpRequest$ #RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC] #RewriteRule ^index\.php(.*)$ $1 [R=301,NS,L] # Keep people out of codeigniter directory and Git/Mercurial data RedirectMatch 403 ^/(system\/pyrocms\/cache|system\/codeigniter|\.git|\.hg).*$ # Send request via index.php (again, not if its a real file or folder) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d <IfModule mod_php5.c> RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> <IfModule !mod_php5.c> RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] </IfModule> 

没有更多的信息是不可能的。 请发布您的.htaccess文件和httpd.conf的相关部分。 另外,你的意思是失败 – 这是否意味着你得到了authentication请求,但是你的用户名/密码不起作用,或者根本没有得到authentication请求?