This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: REDIRECT to 404 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Not2Bright
Newbie
Newbie


Joined: 12 August 2011
Online Status: Offline
Posts: 3
Posted: 12 August 2011 at 9:30pm | IP Logged Quote Not2Bright

Hi All - Any help on this would be appreciated!

I want hotlinks to a website and mobile browsers to both return a "404 not found" error message. Is the code below the simplist way to do that?  Thanks in advance!

RewriteCond Referer: .*(?:keywords|go|here).*
RewriteRule (.*) $1 [I,NF]
 
RewriteCond %{HTTP_USER_AGENT} (?:android|iphone|blackberry|palm) [NC]
RewriteRule .? - [NF]
Back to Top View Not2Bright's Profile Search for other posts by Not2Bright
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 15 August 2011 at 7:17am | IP Logged Quote Anton

If you have ISAPI_Rewrite 2, the rules should be:

RewriteCond Referer: .*(?:keywords|go|here).*
RewriteRule (.*) /custom404.asp [I,L]

RewriteCond User-Agent: .*(?:android|iphone|blackberry|palm).*
RewriteRule .* /custom404.asp [I,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum