Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- An htaccess redirect not working in G Chrome


jdMorgan - 3:07 am on Feb 1, 2011 (gmt 0)


According to my testing over the past few minutes, neither Chrome (AppleWebKit) nor Firefox can be made to send a blank URL-path. This missing slash is not part of the hostname (loosely, the "domain name"), it is part of the URL-path. It is not technically correct to send a blank URL path, and in order to do so, one must send an HTTP request line like
GET<space><space>HTTP/1.1
instead of the valid
GET / HTTP/1.1

What I see is that if I type "example.com" into the address bars of Chrome and Firefox, both append the slash when making the request to my servers. However, Firefox shows the corrected URL in its address bar, but Chrome does not. As this is strictly a display issue, it has nothing to do with your htaccess working for one browser versus another.

More likely, the requestors you see in your logs making requests for blank URLs are 'bots masquerading as browsers... I doubt that any modern browser can be made to send a truly-blank request-URI path. Most likely, these are requests from badly-coded scripts. If in doubt, fully-validate all of the HTTP request headers, to include Connection, Accept, Accept-Language, Accept-Encoding, Accept-Charset, etc., and you may find that these are not really the browsers they claim to be...

Note: I do have a rule that detects a blank URL-path in the request line, and I only see it getting invoked by "questionable" user-agents.

Jim


Thread source:: http://www.webmasterworld.com/apache/4259791.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com