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> Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/ 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. Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719452 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 Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719453 Share on other sites More sharing options...
trq Posted December 19, 2008 Share Posted December 19, 2008 See my edited reply. Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719454 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. Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719456 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. Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719463 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? Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719528 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.. Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719807 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. Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719947 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 Link to comment https://forums.phpfreaks.com/topic/137649-first-try-at-this/#findComment-719994 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.