Use .htaccess to refuse/restrict specific domains to access certain folders

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

options +FollowSymLinks -MultiViews
RewriteEngine on
# If the request is for ...
RewriteCond %{HTTP_HOST} ^www\.leonli\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^cloudpapa\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.cloudpapa\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^leonli\.com$ [NC]
# ... and the URL starts with files/images, deny access ([F] = Forbidden)
RewriteRule .? - [F]

Place it under the target folder.

Leave a Reply

Your email address will not be published. Required fields are marked *