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: exclude directory or specific url string
Author
Message |
bfree
Newbie


Joined: 13 April 2011
Location: United States
Posts: 2
Posted: 13 April 2011 at 4:37pm

Hi. I need to modify my rewrite rules to exclude a certain
directory but have been unable to do it.

I have this rule currently:

RewriteCond Host: www\.myhost\.com
RewriteRule ([^.]+) /myindex.htm\?uri=$1 [L]

This directs all requests for www.myhost.com to the myindex.htm
file, and it works great.

I need though to exclude requests that have a specific string
in them - xyz in this example. So I need the above rule to
apply to all requests except those like:

www.myhost.com/xyz
www.myhost.com/xyz/
www.myhost.com/xyz/123

Please help. Thank you. GREAT product.
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 14 April 2011 at 2:21am

Please try to use the following:

RewriteCond Host: www\.myhost\.com
RewriteRule /(?!xyz.*)([^.]+) /myindex.htm\?uri=$1 [L]

__________________
Regards,
Anton
Back to Top
 
bfree
Newbie


Joined: 13 April 2011
Location: United States
Posts: 2
Posted: 14 April 2011 at 7:54am

Works great. Thanks 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