httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Hiding javascripts, stylesheets and images
Date Tue, 15 Jan 2002 09:51:22 GMT
Jacob Vennervald Madsen wrote:
> 
> Hi List
> 
> Is it possible to hide my javascripts, stylesheets and images so that
> people can't download them? Only if it's as a part of another html page?

In order to use them, they have to be accessible so you can't completely
prevent a determined user from saving them. However, you can prevent
casual browsing by placing them in a separate directory (still under the
doc-root), switching off directory indexing and making sure not to leave
an index.html file in that dir. Explicitly:

DocumentRoot /home/www/html

<Directory /home/www/html/css-js-gif>
  Options -Indexes
</Directory>

then in your html pages you have something like:

<img src="/css-js-gi/banan.gif">

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message