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: Basic rule - exclude specific directories Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
simonrl
Newbie
Newbie


Joined: 29 May 2005
Location: United Kingdom
Online Status: Offline
Posts: 12
Posted: 02 March 2011 at 5:48am | IP Logged Quote simonrl

I'm using this very basic rule:

[ISAPI_Rewrite]

RewriteRule /([^./]+)/? /default.aspx\?ref=$1 [I,L]

It rewrites http://www.somedomain.co.uk/some-url/

To:

http://www.somedomain.co.uk/default.aspx?ref=123

Is it possible to exclude in a rule certain values that aren't passed in ?ref= but are physical folders, e.g.

http://www.somedomain.co.uk/admin/
http://www.somedomain.co.uk/uploads/

Those aren't to be re-writen, whereas anything not specified does get re-written.

Thanks!


Back to Top View simonrl's Profile Search for other posts by simonrl
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 02 March 2011 at 7:47am | IP Logged Quote Anton

Yes, sure it's possible:

[ISAPI_Rewrite]

RewriteRule /(?!(?:admin|uploads).*)([^./]+)/? /default.aspx\?ref=$1 [I,L]

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


Joined: 29 May 2005
Location: United Kingdom
Online Status: Offline
Posts: 12
Posted: 02 March 2011 at 7:58am | IP Logged Quote simonrl

Thank you. Perfect!
Back to Top View simonrl's Profile Search for other posts by simonrl
 

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