phpSensei Posted December 19, 2008 Share Posted December 19, 2008 im trying to protect my js file with htaccess but it doesnt work <FilesMatch AjaxUpload.js> AuthName "Member Only" AuthType Basic AuthUserFile /filecrave.com/.htpasswd require valid-user </FilesMatch> Quote Link to comment Share on other sites More sharing options...
trq Posted December 19, 2008 Share Posted December 19, 2008 Your matching an index.html file. By the way, doing this will render your js unusable without providing a password. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 19, 2008 Author Share Posted December 19, 2008 Yoru matching an index.html file. Sorry, that was an old copy paste, its supose to say AjaxUpload.js Quote Link to comment Share on other sites More sharing options...
trq Posted December 19, 2008 Share Posted December 19, 2008 See my edited reply. Quote Link to comment Share on other sites More sharing options...
trq Posted December 19, 2008 Share Posted December 19, 2008 And you ought be using Files not FilesMatch. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 19, 2008 Author Share Posted December 19, 2008 Okay, Isn't there an easier to protect a Js files. I know couple of ways but it will take me long to code it. Quote Link to comment Share on other sites More sharing options...
trq Posted December 19, 2008 Share Posted December 19, 2008 js files need to be accessible in order to work, what are you trying to protect them from? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 19, 2008 Author Share Posted December 19, 2008 js files need to be accessible in order to work, what are you trying to protect them from? I know that, I have a client that wants a JS script done, I want to show it to him VIA my server but he can always just copy paste the js script and steal it.. Quote Link to comment Share on other sites More sharing options...
trq Posted December 19, 2008 Share Posted December 19, 2008 Indeed he could and there really isn't much you can do about it. js executes on the client, therefore it needs to be accessible in order to work. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 19, 2008 Author Share Posted December 19, 2008 Indeed he could and there really isn't much you can do about it. js executes on the client, therefore it needs to be accessible in order to work. Thanks for the help anyways , the script is also dependent on a php file so it doesnt matter. I got paid so its fine. again thankyou Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.