I am using the
<script src=script location></script>
to call the javascript
I have the script in a folder called js and in that folder I have a .htaccess with the following information:
# -FrontPage-
Options None
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName website.com
AuthUserFile /usr/local/etc/httpd/htdocs/_vti_pvt/service.pwd
AuthGroupFile /usr/local/etc/httpd/htdocs/_vti_pvt/service.grp
Rewriteengine on
RewriteCond %{HTTP_REFERER} !^[url]http://website.com/.*[/url]$ [NC]
RewriteCond %{HTTP_REFERER} !^[url]http://www.website/.*[/url]$ [NC]
RewriteRule .*\.(js|JS)$ - [F]
When I try to access the .js file I get the denied access which is great. But, it works to good and the <script src=... also lost access. How do I allow access to the javascript from <script src= on my server but not allow direct calls to the javascript? (The file that is requesting the script is in a different directory)
Thanks