RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+\.)?xyz\.com [NC] ## allow RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+\.)?pqr\.com [NC] ## allow RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+\.)?abc\.org [NC] ## allow RewriteRule \.(gif|jpe?g|png|gif|bmp|jpe|mov|mpg|avi|mpeg|jpg)$ http://www.mnr.com [NC,L] ## Forward