Hotlinking My Cascading Style Sheets

Hotlinking my Cascading Style Sheets

You can use your .htaccess file to restrict the domain.

Reference 1

Reference 2 http://www.globinch.com/2011/04/13/prevent-hotlinking-of-image-script-css-etc-using-htaccess/

How to find out who is using my code?

You can check the request body fields, assuming that they're stealing your server's bandwith. You can also write a crawler that tries to match your html with other but It won't be reliable. Maybe you can use Google to find specific html blocks: http://en.wikipedia.org/wiki/Google_hacking

htaccess - can block directory view, but files are still directly viewable

You can set restrictions like this:

Order Deny, Allow
Deny from all #everyone will not be allowed except the following line
Allow from 127.0.0.1 123.123.123.123 #allowed hosts separated by space

Using htaccess, how to restrict seeing directory contents, but allow server to use the contents?

All you need to keep people from seeing the directory contents is an index.php or .html file in that folder. Any requests for yoursite.com/images will load index.php, which you'll set to a dummy page.

index.html could be something like:

<html><title>Forbidden!</title><body>Nothing to see here...</body></html>

or a redirect script index.php:

<?php header('Location: /index.php'); exit(); ?>

Don't use .htaccess for blocking directory listings, it blocks access to everything.



Related Topics



Leave a reply



Submit