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: exclude directory or specific url string Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bfree
Newbie
Newbie


Joined: 13 April 2011
Location: United States
Online Status: Offline
Posts: 2
Posted: 13 April 2011 at 4:37pm | IP Logged Quote bfree

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 View bfree's Profile Search for other posts by bfree
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 14 April 2011 at 2:21am | IP Logged Quote Anton

Please try to use the following:

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

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


Joined: 13 April 2011
Location: United States
Online Status: Offline
Posts: 2
Posted: 14 April 2011 at 7:54am | IP Logged Quote bfree

Works great. Thanks Anton!
Back to Top View bfree's Profile Search for other posts by bfree
 

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