|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Stop hot linking on .js files?
I was wondering, is it possible to stop hot linking of external JavaScript files (.js)? I would think the below code put inside the .htaccess file would work, but for some reason it doesnt:
RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC] RewriteRule \.(js)$ - [F] thanks for any help |
|
#2
|
|||
|
|||
|
Here what I setup to stop the hot linking on png, jpg, gif, css and js file; it works great..
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC] RewriteRule \.(gif|jpg|png|css|js)$ - [F] Did you have your mod_rewrite enable? Last edited by mezz : November 4th, 2001 at 05:43 PM. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Stop hot linking on .js files? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|