![]() |
Hide files being accessed directly?
I want to hide js from being viewed directly..
|
Putting this in your .htaccess file should do it
Quote:
|
I do a similar things to protect my PHP library / includes folder. I have a .htaccess file in each folder I want protected with:
Code:
deny from allAlan |
Sometimes I think 403 errors are just nasty to look at.
|
That's why you use custom error handlers to display a nice friendly error to your visitors :-)
I'm a firm believer that a visitor should never be shown a PHP or HTTP error message directly. The message should be logged and a nice friendly error page should be shown to the user. display_errors = Off ! :-D Alan |
Quote:
Sending the people to a 403 page when accessing the javascript will break your page IIRC. The browser sends the request for the javascript page not the server so when someone tries to load the page the request for the javascript will return a 403. |
Yeah, the browser makes a call to the javascript, not the server. Therefore a deny all statement would block all access whatsoever to the file.
|
As Javascript doesn't require any line termination character -- not even a semi-colon or a line break, making it utterly confusing is fairly straightforward. Simply place the entire Javascript code on 1 line.
|
I'm using dean edwards packer but theres a unpacker -.-.. is there any other JS encrypters?
|
No, JS is client side so you would have to make them install something on their browser. Its as simple as this, if the client's browser can run it, the client can view the source.
|
| All times are GMT. The time now is 06:05 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0