Welcome to WebmasterWorld Guest from 18.206.48.142

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Headers Returned

do these seem proper

     
7:10 am on Mar 4, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 2, 2002
posts:87
votes: 0


Here's my situation..
I have an Apache server, it is automatically setup to redirect non-www to www in httpd.conf. The default mod-rewrite from Apache in the configuration file is [R] which always returned the obvious 302, so I changed it to [R=301]. My question is when I query www.domain.com on http1.0 protocol it shows the 301 redirecting to www.domain.com, in other words to itself. http1.1 gives the correct 200 ok. I know http1.0 can't read headers, but should it show a 301 or 200? I'm assuming a 200.
here is my redirect code

RewriteEngine on
RewriteCond %{HTTP_HOST}!^000.000.000.000(:80)?$
RewriteCond %{HTTP_HOST}!^www.domain.com(:80)?$
RewriteRule ^/(.*) [domain.com...] [L,R=301]
RewriteOptions inherit

would the following fix the issue assuming it would check for the host, and if http1.0 then give a 200?

RewriteCond %{HTTP_HOST} .

-phish

4:04 pm on Mar 4, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Yes, HTTP/1.0 clients do not send a host header to your server, therefore your server will redirect, because the variable is blank and won't match your specified hostname or IP address.

Adding the blank-check RewriteCond will fix it.

Jim

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members