Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Redirecting whole domain with 1 exception Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
moopy
Newbie
Newbie


Joined: 21 July 2009
Location: Israel
Online Status: Offline
Posts: 11
Posted: 09 December 2009 at 10:07am | IP Logged Quote moopy

Hi!

I need help with a rewrite rule please...

I need to redirect 301 www.domain.com/* to the same URLs under www.domain.co.il/*

Now here's the issue. I would also need to NOT redirect www.domain.com/afile.html at all! This I don't know how to do...

Here's my start (which works):

-----------------------------------------------------

[ISAPI_Rewrite]

RewriteCond Host: ^www.domain.com
RewriteRule /(.*) http\://www.domain.co.il/$1 [I,RP]

RewriteCond Host: ^domain.com
RewriteRule /(.*) http\://www.domain.co.il/$1 [I,RP]

RewriteCond Host: ^domain.co.il
RewriteRule /(.*) http\://www.domain.co.il/$1 [I,RP]

-------------------------------------------------

As always, I appreciate your help very much.

Thank you!

 

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


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 10 December 2009 at 3:17am | IP Logged Quote Anton

Please try to use the following config instead:

[ISAPI_Rewrite]

RewriteCond Host: (?:(?:www\.)?domain\.com|domain\.co\.il)
RewriteRule /(?!afile\.html)(.*) http\://www.domain.co.il/$1 [I,RP]

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


Joined: 21 July 2009
Location: Israel
Online Status: Offline
Posts: 11
Posted: 24 December 2009 at 8:36am | IP Logged Quote moopy

It worked! Thanks!
Back to Top View moopy's Profile Search for other posts by moopy
 

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