Forum Moderators: DixonJones

Message Too Old, No Replies

404 errors for *title*_files/style.css

What causes this error log entry?

         

stevenha

2:45 am on Nov 3, 2002 (gmt 0)

10+ Year Member



My error logs have lots of entries that don't make sense to me, so I'm asking for help to explain them (and avoid them if possible).

My pages use CSS styles via the @import mechanism. The problem appears on pages that are in a subdirectory, (but not on pages in the root directory). My pages will have (in-between style tags) @import "../stylies.css";

The 404 error has a peculiar format. Browsers are trying to get files like this:
GET /dir/My%20Title_files/stylies.css

where "dir" is directory name, "My Title" is the actual title of the page (not the filename), and "_files" appears in every request.

I'm really puzzled because pages in my root directory don't seem to cause similar error log entries. Thanks in advance.

jatar_k

6:39 pm on Nov 3, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you trie using the absolute path instead of the relative?

instead of this ../stylies.css which is saying go up one level and get it, it could be set up from the root of the site.

/stylies.css // if it is at root level
/dir/stylies.css // if it is in a dir down from root

I don't really understand where the errors come from but since they only happen below root then it ould seem to me that there is a path problem.

spock

1:09 pm on Nov 5, 2002 (gmt 0)

10+ Year Member



It's a long shot, but the title + "_files" names sound suspiciously close to what you get when you use Save As to save a local copy of a web page in Internet Explorer.

If there's a bug in (some versions of) IE that causes it to fail saving/resolving relative path names in @import rules from such saved pages, that might explain the 404s.

stevenha

4:00 pm on Nov 5, 2002 (gmt 0)

10+ Year Member



Yes, Thanks Spock, That seems to be it. What a great observation!
I checked this, and when Internet Explorer does a Save As to a local file, it also re-writes the @import code to say:
"@ import url( *title*_files/stylies.css);

Internet Explorer creates a folder named *title*_files locally, and stores a copy of the stylies.css file in there, along with any gifs and jpegs referenced by the page.

I just tried this from IE 5.5 on winNT, and I didn't get any error written into my error logs, so it must be happening with some other versions of IE.

It doesn't look like there's anything I can do about it either. I might have to give up using @import. (I'm also surprised about how many people are saving locally.)