In this case, the scripts are functional, but the first time I type the location of .js file, I can get it open. Only when I refresh the page that I get redirected. I really can't understand why this happens...
I find this really useful to block hotlinks, but it's not always bloking type-in requests.
By the way, I have no access to apache configuration.
I only have one contact on WhatsApp. And that contact has sms also. I have many more contacts that use WhatsApp also, but everyone defaults to use iMessage, SMS or RCS anyway. Not a loss for me. I'm in Norway where mostly nobody uses WhatsApp.
Apple is boring for a kid. Only fun is browsing websites for HTML games.
A PC with steam is another story. Of course if the child plays video games all day then maybe that might not be a good idea. :-)
Looking for a specific setting in Settings? Sorry, the option just doesn’t exist as you’d need to elevate for that.
Want to do something quickly and efficiently? Nah, forced to use a “modern” interface which takes far longer to achieve what you’re looking to do. (Example: disable a NIC)
Yet the best laptop for all day battery life is a Mac, hands down, no contest.
Windows is bloated and power management is rubbish. Search indexer. Defender. Malicious Software Removal Tool. Windows Update (+DISM). Office CTR. Telemetry.
Disclaimer: I own a surface laptop studio, multiple gaming desktops, server, and a macbook pro.
Question
andressito
Hi everyone,
I'm trying to use the .htaccess file to prevent type-in access to .js (javascript) files which are located in a /scripts folder
with:
I can block type-in access, but the pages cannot use the scripts. I add "Allow from 127.0.0.1" but no results.
I also tried:
Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://mydomain.* [NC] RewriteRule .*\.(js)$ http://mydomain.com [R,L]
In this case, the scripts are functional, but the first time I type the location of .js file, I can get it open. Only when I refresh the page that I get redirected. I really can't understand why this happens...
I find this really useful to block hotlinks, but it's not always bloking type-in requests.
By the way, I have no access to apache configuration.
Any help would be appreciated.
Thanks
Link to comment
https://www.neowin.net/forum/topic/905644-prevent-access-to-files-using-htaccess/Share on other sites
7 answers to this question
Recommended Posts