WTF Stylesheet issue

Mike

New member
Jun 27, 2006
6,777
116
0
51
On the firing line
Okay, this has me baffled.

I'm using AWS for my CDN and it works great for everything except this one stylesheet and I don't understand why.

When the stylesheet is on the same server it works just fine:
Code:
<link rel="stylesheet" type="text/css" href="css-stuff.css" />
However, when it's uploaded to Amazon, it doesn't work.

Code:
<link rel="stylesheet" href="http://xxxxxxxxxxx.amazoncdn.com/directory/css/css-stuff.css" type="text/css" />
I have checked the ACL settings: Read for everyone, checked the ACL settings for the folder it's in, also Read for everone, I know that the bucket has been deployed, AND if I go to the link directly I can get the stylesheet.

Also tried deleting that bucket and starting over. Nada. Tried putting the stylesheet in a bucket that has other pages / sites pulling from it just fine. Still nothing.

Even stranger yet...I'm using AWS with my stylesheets on multiple other sites.

After all that, I think it has to do with my page.

Is it possible the .htaccess file is messing with it?

Code:
Options -Indexes

<Files *.inc>
    Deny From All
</Files>

ErrorDocument 400 http://google.com
ErrorDocument 401 http://google.com
ErrorDocument 403 http://google.com
ErrorDocument 404 http://google.com
ErrorDocument 500 http://google.com

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:
<Files *.html>
SetOutputFilter DEFLATE
</Files>
I'm flummoxed here guys. Anyone have any ideas?
 


try commenting out the css compression

also, ssh into your server and "tail -f error_log" on your apache logs, should spit out the error on page load.
 
Thanks dchuk, I commented out the css line of the .htaccess file. No joy.

Oddly, I can use a similar stylesheet just fine. The other stylesheet is in a different bucket, so I figured it must be a problem with the way I have the bucket setup. Nope.

Then I thought it might be the headers. Nope. Same headers. Expires, Cache Control, Content-Type.

Friggin' weird.

I don't know how to SSH into the server without messing something up. Sorry, that's a skill I never mastered. I can SSH into it and view directories, but beyond that... *shrug*

Guess it's time to learn.
 
Found the problem!

Somehow, when I'm uploading the files the Content Type is showing as Binary/Octet, instead of Text/CSS.

I'm using CloudBerry Pro. And it's not showing in CloudBerry, but I found it by going to AWS directly and checking the properties.

I'm thinking that this is a case of PEBCAC, but it could be a CloudBerry issue.

/edit/

Yep, PEBCAC all the way. I've never checked content type when uploading before, but for some reason the CSS I'm uploading today keeps getting tagged as binary/octet, so it's just a matter of editing the headers. No big deal. I should have caught that before.

For you n00bs:
nero-pebcac-problem-exists-between-chair-and-computer-computer-admin-t-shirt_design.png