Hi, I need the rewrite rule to disable the browsing site like below: http:*//domain.com/abc.php?c=http://otherdomain.com/abc.txt? (* is used to disable active link) Can anybody provide me the such rule which I can write in .htaccess file so that if anyone browse the website like above, they will get 403 forbidden error. Thanks, Kailash
RewriteRule ^/?abc.php\?.*c=https?://otherdomain.com/abc.txt - [F,L] Although someone could still get around this... by URL encoding the parameters passed to your script. The most robust way would be to do this in PHP. Validate the URL and if it's not valid, you can send a custom 403 page with: header("403 Forbidden"); echo("You are not allowed to view pages from otherdomain.com using this script."); PHP: