Error 404 retrieving .CSS file

I have a folder protected with a password using .htaccess.
In it there are several .php and .js files, all of which I can access fine.
There is also a .css file (form.css) which always gives an error 404.
Actually if I use the debugger in the browser (chrome and/or Firefox) the response to the GET command is “302 Found (from disk cache)”, yet I get an error 404.

If I rename the file to form1.css, I can load it without error. Equally if I rename it to anything else.

So I am puzzled: I can load all files from this directory except for one with a specific name.


Thanks for your help and suggestions.

It could be that your browser cashed something, just clear your cache and see if that helps. Note that if a CSS or JS file is in a protected folder and you are trying to use it on your website, it may not work, or require a password.

Thanks for the suggestion. I already cleared the browser cache. Strangely the file loads if renamed - so not a problem of accessing the protected folder. Also: What does the error 302 which I see in the browser’s debugger mean. It states that the server relocated the resource, but no location is given. All other .css files load fine - just this one does not.


HTTP error code 302 means Forbidden, as in the browser is not allowed to access the file. Maybe just rename it than, you may have accidentally set a wrong permission for the filename at some point.

Sorry to disagree, but as far as I understand 302 is a redirection message. It does not mean “forbidden”. Wikipedia states:

The HTTP response status code 302 Found is a common way of performing URL redirection. The HTTP/1.0 specification (RFC 1945) initially defined this code, and gave it the description phrase “Moved Temporarily” rather than “Found”.


@skg4820, you are correct, for some reason I was thinking about 403, not 302 (I don’t know how that happened.)

But yes, 302 is actually a Temporary redirect (unlike 301, which is a permanent redirect) There may be something in your .htaccess file making it do this, can you show your .htaccess file here?
Thanks, and sorry about that.

Can you share your website URL?

@TigerMANEK426: Unfortunately not as the file is in a protected area.

I have since renamed the file (and changed all the .php scripts referreing to it) and it works find. Maybe the name “form.css” is causing problems with the server. Anyway, I have given up trying to solve this one as it defies logic.

Thanks for your help

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.