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: Ignore subdomain
Author
Message |
dooza
Newbie


Joined: 06 April 2009
Location: United Kingdom
Posts: 32
Posted: 09 September 2011 at 11:02am

On our internal network I have this http://internet/ with a set of rewrites. I want the rule to ignore requests for http://old.interent/ which is a copy of our old site which will have its own rules.

I currently use this:

RewriteCond %{HTTP:Host} internet [NC]

Cheers,

Steve
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 12 September 2011 at 6:06am

If you want to redirect all requests from OLD version to NEW, please, try:

Code:
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP:Host} ^old\.internet$ [NC]
RewriteRule (.*) http://internet/$1 [NC,R=301,L]


Regards
Andrew
Back to Top
 
dooza
Newbie


Joined: 06 April 2009
Location: United Kingdom
Posts: 32
Posted: 12 September 2011 at 6:10am

Hi Andrew,
Sorry, I should explain a bit more.

http://internet is the local version of our new website, its using its own set of rules, including a mapfile that redirects old urls to new ones. (The pages have changed names and the whole structure of the site has changed).

I want to be able to view the old version to check on a few things, but the mapfile redirect is also working on http://old.internet/. I want to prevent this from happening on the mapfile redirect.

Cheers,

Steve
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 13 September 2011 at 6:06am

You simply need to add a condition to the mapfile-rule. Condition that applies the rule only for 'internet', but not 'old.internet'.
This would be:

RewriteCond %{HTTP:Host} ^internet$ [NC]

Regards
Andrew
Back to Top
 
dooza
Newbie


Joined: 06 April 2009
Location: United Kingdom
Posts: 32
Posted: 13 September 2011 at 7:20am

I knew it was going to be easy! I had wondered what that syntax meant, and now I know.

Thank you!

Steve
Back to Top
 

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

Printable version Printable version