Welcome to WebmasterWorld Guest from 54.198.179.85

Forum Moderators: not2easy

Message Too Old, No Replies

denying access to CSS?

Could I use .htaccess?

     
5:57 pm on Aug 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Hi all,

if my css files are in /css/ could I deny users access to this dir but allow the webserver?

How can I protect CSS?

Nick

gsx

6:05 pm on Aug 14, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 20, 2002
posts:603
votes: 0


Its the user's browser that requests the CSS file, not the webserver.
6:06 pm on Aug 14, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 1, 2002
posts:351
votes: 0


Uh, if I understand what you are asking correctly, no.

A visitor to your site needs to be able to download the source of all of the relevant files in order to render your the pages, including html, javascript, css, etc.

You can use .htaccess to prevent hotlinking to your css files, however.

6:09 pm on Aug 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Hmmm.. Clearly didnt think this one through, as a php guy, I should damn well know who requests the css files... Sorry chaps..

Nick