if you want to allow some user with specific IP addresses or you want to ban user some IP address. you can do it by IP address
To block specific addresses, as per following example first line makes allow from all the default state.only those are match with denied directives will be denied.
order allow,deny deny from 188.8.131.52 deny from 184.108.40.206 allow from all
It is opposite of IP Blacklisting, as per below example everybody is restricted except "220.127.116.11" and "18.104.22.168"
order deny,allow deny from all allow from 22.214.171.124 allow from 35.34.6.* #IP address wildcard
As per example , You can also allow or bloack users depend on domain name. this will not work reverse-DNS IP mapping
order allow,deny deny from example.com allow from all
This works for subdomains, abc.example.com will also blocked
Referer request header contains a link of the previous website page that called referrer, it is not work on clickable hyper links og web page. If any website use the images of your website directly. This is called hotlinking. if you need to do, you have to activate "mod_rewrite" module.
RewriteEngine on RewriteCond % ^http://.*example.com [NC,OR] RewriteCond % ^http://.*htaccessexample.com [NC,OR] RewriteCond % ^http://.*functionsexample.com [NC] RewriteRule .* - [F]