[thelist] Paradoxical CSS Include

Paul Cowan evolt at funkwit.com
Tue Jun 8 07:32:17 CDT 2004


On 8/06/2004 6:38 AM -0400 Hershel Robinson wrote:
> <link rel="StyleSheet" href="/pages/errors.css" type="text/css" />
>
> They seem to work just fine (and look lovely) except for 403-4. This error
> is "SSL Required" meaning that the user has attempted to access the server
> via http instead of https. This error page comes into the browser without
> the CSS styling.

The problem here is the relative link. If a user goes to
http://somewhere.com/somedir/somefile.html
and a secure connection is required, then the relative URL (starting with a 
/) will become
http://somewhere.com/pages/errors.css

The problem being that the error condition -- 'secure connection required' 
-- is probably also applying to the css page too. In other words, the 
browser requests /pages/errors.css, and the server says the same thing - 
403-4, SSL required.

If you go to the https:// version of the page, then the relative URL will 
be https://somewhere.com/pages/errors.css and it will work fine, I'm 
tipping.

Solutions:
1) In this case, rewrite the stylesheet link to an absolute URL starting 
with https://
2) Probably more sensible, set up IIS so that secure connection is NOT 
required for the CSS file itself.

Cheers,

Paul



More information about the thelist mailing list