This might be the strangest thing I've seen. When I do an HTTP GET from Firefox, Chrome, or I8, Apache will return a 200 (ok) response. But when I send the same request from IE8 in compatibility mode, the server returns a 302 (temporary redirect) and sends the server into an endless redirect loop.
I have the server logs to prove it. I normally get a response like this:
127.0.0.1 - - [09/Nov/2010:13:02:25 -0600] "GET /tabby/members/login HTTP/1.1" 200 5712 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12"
But with IE8 in compatibility mode I get a response like this:
127.0.0.1 - - [09/Nov/2010:13:03:17 -0600] "GET /tabby/members/login/ HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; .NET4.0C; InfoPath.3)"
IE will then try the request over and over, endlessly. This happens both on my local development machine (Windows) and on my test server (Linux).
I suspect one of two causes. The first could be the rewrite rules in my .htaccess file. I'm also using PHP to set the location header in some of my scripts, which should generate a 302.
For what it's worth, here's my .htaccess file:
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /tabby/
# Protect application files from being viewed
RewriteRule ^(application) - [F,L]
# Allow any other files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/
RewriteRule .* index.php/$0 [PT,L]
Are there any known issues with how IE7 handles 302 responses? Why would Apache send 200s for some browsers and 302s for others?