![]() |
Super N00B question
One of my sites relies on a .js file to function. Right now anyone can see the .js file. I want to move it to a password protected folder and load it from there. So if anyone tries to see it they can't
If I password protect a folder via cpanel, put the script in that, how do I get it to load properly? Thanks:thumbsup |
you could do that through a htaccess file.
Allow and enable access from certain IP (your server IP) Say you have a permanent IP and you want to administer the site via /admin and protect the directory from the rest of the world once ‘n’ for all, then you will want the following .htaccess directives: order deny, allow deny from all allow from 12.34.56.78 I think this is what you need (http://www.kavoir.com/2009/01/htacce...ry-access.html) |
thank you sir
|
Does the site rely on the .js file for everybody to use the site ? or just for your use ?
|
everybody needs it or the site does not work, if someone has java disabled it offers an alternative. I just don't want people looking at the .js file
|
If everybody needs to use the .js file for it to work, then putting it in a password protected area will prevent browsers from loading it, thus the site will not work.
|
|
you can't hide a client side script
|
Quote:
you can just encode it somehow... but it can be decoded eventually |
you can make it harder, but you won't be able to hide it completely...
|
This is the internets..srs bsnss
|
Quote:
Some encoders may require that "eval" be replaced with "alert" more than once, but they are all trivial. Quote:
Similarly, "JavaScript" and "Java" are two completely unrelated things created at different times by different companies. The people selling LiveScript renamed it "JavaScript" because at the time Java was a hot buzzword. It's the same thing as Xbox 360, Anderson Cooper 360, Symantec Norton 360, Nordic Track 360 etc. In other words, turning off Java affects your JavaScript just as much as turning off your XBox affects Anderson Cooper - not at all, even though they both have "360" in their name. |
Quote:
|
| All times are GMT -7. The time now is 11:15 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123