Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: RewriteRule with exceptions Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
charperimg
Newbie
Newbie


Joined: 06 August 2008
Online Status: Offline
Posts: 1
Posted: 06 August 2008 at 5:08pm | IP Logged Quote charperimg

I need to write a rewrite rule to write/redirect someone when the URL is anything BUT the short list of exception URL's I need to stay on the originating server.  So far, the only directive I can get to work is:

RewriteRule ^/dnav/(?!(82/)).*        http\://www2\.newurl\.com [R,I]

What I need to be able to do is have that rule be able to NOT take action when the URL is any of the following:

/dnav/82/ (or anything afterwards)
/login (or anything afterwards)
/site/login (or anything afterwards)
/auth (or anything afterwards)

Does anyone have any advice? My brain is fried trying to write rewrite rules that DO NOT take action when a condition is true.

ANY help is greatly appreciated.
Back to Top View charperimg's Profile Search for other posts by charperimg
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7559
Posted: 07 August 2008 at 7:31pm | IP Logged Quote Lexey

RewriteRule /(?!(?:dav/82/|(?:site/)?login|auth)).* http\://www2.newurl.com [R,I]
Back to Top View Lexey's Profile Search for other posts by Lexey
 

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