Tuesday, December 2, 2008
Preventing Java Script (js) files to be viewed by Users
Keywords: .htaccess, Apache, LAMP, WAMP, MAMP, SAMP, PHP, MySQL, Website, Javascript, Preventing JS files
Question: Sometimes you wish your precious code shouldn't be shared with others?
if your answer to the above question is, Yes?
The following lines will prevent the users viewing the JS (javascript) files of your application/website. It shall be added to your ".htaccess" file
Options -IndexesRewriteEngine onRewriteCond %{HTTP_REFERER} !^http://localhost/.*$ [NC]RewriteRule \.(js|css)$ - [F]
For more information on .htaccess file, click thro the following link:
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment