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 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: redirect any URL that does not match
Author
Message |
goldmail
Newbie


Joined: 19 August 2009
Posts: 22
Posted: 13 October 2010 at 1:20pm

I need to be able to redirect any URL that does not match this criteria.  Basically if the exact length of characters after the / is not exactly 12 characters, redirect to a custom 404 error page

abc.com/([a-z,0-9]{12,12})

 

for example, http://abc.com/12345 would go to http://abc.com/404.html

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 14 October 2010 at 2:04am

Please try to use the following:

[ISAPI_Rewrite]
RewriteRule /(?![a-z0-9]{12}).* http\://abc.com/404.html [I,RP]

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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