Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Forward old domain to new domain Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
tonyh
Newbie
Newbie


Joined: 12 July 2010
Location: Canada
Online Status: Offline
Posts: 3
Posted: 12 July 2010 at 11:28am | IP Logged Quote tonyh

Hi,

I'm trying to redirect all traffic from old domain to new
domain with the following rule.

RewriteCond Host: (?:www\.)?OLDDOMAIN\.com
RewriteRule (.+) http\://www.NEWDOMAIN.com$1 [I,RP]

The rule partially works, but when a trailing slash is
present in the url, the rules does not get matched.

EX:

Not working -> http://www.OLDDOMAIN.com/en/cars/

Working -> http://www.OLDDOMAIN.com/en/cars

I cannot use the "remove all trailing slashes fix" as it
breaks my other rules.

How can I fix this ?

Thanks!
Back to Top View tonyh's Profile Search for other posts by tonyh
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 13 July 2010 at 3:07am | IP Logged Quote Anton

"...when a trailing slash is present in the url, the rules does not get matched."
- are you sure it really doesn't get matched? What result/error do you get?

Please check httpd.parse.errors file for possible error messages.

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


Joined: 12 July 2010
Location: Canada
Online Status: Offline
Posts: 3
Posted: 13 July 2010 at 8:48am | IP Logged Quote tonyh

Hi Anton,

When I say the rule does not get matched, I mean that the
redirection is not working...

Like I said, the following example ilustrates the current
behavior:

Nothing happens -> http://www.OLDDOMAIN.com/en/cars/

Successful redirection ->
http://www.OLDDOMAIN.com/en/cars

I don't have access to the httpd.parse.errors file.

Any help would be greatly appreciated.

Thanks!
Back to Top View tonyh's Profile Search for other posts by tonyh
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 13 July 2010 at 9:07am | IP Logged Quote Anton

Is this the only rule you have in the config?
Does it work when you directly request http\://www.NEWDOMAIN.com/en/cars/ ?
Do you have any other ISAPI filters registered?

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


Joined: 12 July 2010
Location: Canada
Online Status: Offline
Posts: 3
Posted: 13 July 2010 at 9:34am | IP Logged Quote tonyh

Anton,

You rang a bell when you asked if I had other rules...I had
a rule with a [L] flag getting match just before...

Thanks!!!
Back to Top View tonyh's Profile Search for other posts by tonyh
 

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