Welcome to WebmasterWorld Guest from 54.211.136.250

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Deny directory access but allow execution

need help with a small .htaccess problem

   
3:17 pm on Oct 16, 2005 (gmt 0)

10+ Year Member



I guess this is an easy one for .htaccess gurus, unfortunately not for me :-(

I have a directory with a Javascript that is called from some of my pages. How do I prevent people from downloading the script to their computers without disallowing my own site to execute this script? Would be most greatful if someone could post the necessary .htaccess code.

5:54 pm on Oct 16, 2005 (gmt 0)

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



JavaScript is executed client-side -- in the browser.

Therefore, you can't prevent it from being 'downloaded' since that is the only way the browser can execute it.

Jim

6:07 pm on Oct 16, 2005 (gmt 0)

10+ Year Member



Thanks, Jim!