SandySynaptik Posted October 9, 2011 Share Posted October 9, 2011 Here is what I want:I want to allow these domains:http://mydomain.comhttp://www.mydomain.com Want to disable these file types:jpg,jpeg,gif,png,bmp Want to redirect that request to:http://mydomain.com/sorry.html Actually this feature is provided by my host but due to some reason I can't enable this, I will have to do this manually. Link to comment Share on other sites More sharing options...
Ingolme Posted October 9, 2011 Share Posted October 9, 2011 If the host allows .htaccess files, you can do this: <FilesMatch "\.(jpg|jpeg|gif|png|bmp)$">RewriteEngine OnRewriteCond %{HTTP_REFERER} !^http://mysite.com [NC]RewriteCond %{HTTP_REFERER} !^http://www.mysite.com [NC]RewriteRule ^(.*)$ sorry.html [R,L]</FilesMatch> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.