This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Redirect - ignore everything after domain
Author
Message |
treed
Newbie


Joined: 25 July 2011
Posts: 2
Posted: 21 December 2011 at 3:42pm

Hi All,

I'm kind of new to ISAPI 3 and I'm looking for any help that I can find.

I'm using the following redirect rule on my site:

RewriteCond %{HTTP_HOST} ^www.domain1.org$
RewriteRule ^$ http://www.domain2.com/ [L,R=301]


Which works well... unless domain1 has subfolders etc in the URL (www.domain1.org/somefolder/somepage.aspx). So what I would like to do is ignore everything after the domain and have the following apply:

www.domain1.org = www.domain2.com
www.domain1.org/folder/page.aspx = www.domain2.com
www.domain1.org/page.aspx = www.domain2.com

Is this possible?

Any help is greatly appreciated.
T
 
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 22 December 2011 at 7:05am

Hello T,

Try:

RewriteCond %{HTTP_HOST} ^www.domain1.org$
RewriteRule ^.*$ http://www.domain2.com/ [L,R=301]

Regards
Andrew
Back to Top
 
treed
Newbie


Joined: 25 July 2011
Posts: 2
Posted: 22 December 2011 at 10:03am

Thanks Andrew that is just what I needed!

T
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version