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.
Microsoft is reportedly seeking help from its biggest cloud rival, Amazon Web Services, to address mounting capacity issues of GitHub. According to a report by Business Insider, this move of the company comes after a series of AI-driven outages on the coding platform, which Microsoft acquired in 2018. Despites its plans to migrate GitHub completely to Azure by 2027, increasing demand from AI coding tools has forced Microsoft to adopt a multi-cloud strategy...............
https://cio.economictimes.indiatimes.com/news/corporate-news/microsoft-taps-aws-for-github-capacity-amid-ai-driven-outages-and-multi-cloud-strategy/131761981
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