Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: is ReWrite 3 what I need Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
clearchannel
Newbie
Newbie


Joined: 08 January 2008
Location: United Kingdom
Online Status: Offline
Posts: 36
Posted: 08 January 2008 at 10:54am | IP Logged Quote clearchannel

I have Win2003 server running a mixture of 4 old websites rolled into 1 large website, Thsi website is accessable using 4 domains.

 

Atm I have used IIS redirection so that the domains load the appropriate content /page.

www.domain1.com >>>> www.maindomain.com/content.aspx?ID=34
www.domain2.com >>>> www.maindomain.com/content.aspx?ID=56

What I would like to do is keep the domain in the browser and pull in the content from the current redirect URL so

www.domain1.com would show the content located at www.maindomain.com/content.aspx?ID=34

IS rewrite the tool for the job???

Back to Top View clearchannel's Profile Search for other posts by clearchannel Visit clearchannel's Homepage
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6449
Posted: 10 January 2008 at 6:44am | IP Logged Quote Yaroslav

ISAPI_Rewrite can proxy content to achieve desired result. But what will happen with links on these pages? Do they reflect reqired changes?
Here is a rule example:

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^(?:www\.)?domain1\.com [NC]
RewriteRule ^$ http://www.maindomain.com/content.aspx?ID=34 [P]
RewriteCond %{HTTP_HOST} ^(?:www\.)?domain2\.com [NC]
RewriteRule ^$ http://www.maindomain.com/content.aspx?ID=56 [P]

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
clearchannel
Newbie
Newbie


Joined: 08 January 2008
Location: United Kingdom
Online Status: Offline
Posts: 36
Posted: 10 January 2008 at 7:01am | IP Logged Quote clearchannel

Well all links in the website are relative to the site root and so they should all work fine i.e href="/content.aspx?ID..."

Would I have to change anything in IIS, or just make sure the 1 set of website files has the 4 domains associated with it?

Back to Top View clearchannel's Profile Search for other posts by clearchannel Visit clearchannel's Homepage
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6449
Posted: 10 January 2008 at 7:32am | IP Logged Quote Yaroslav

You didn't mentioned anything that you are going to associate these domains with one site in IIS. Then it simplyfies things. Here is new rules for you:

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^(?:www\.)?domain1\.com [NC]
RewriteRule ^$ content.aspx?ID=34
RewriteCond %{HTTP_HOST} ^(?:www\.)?domain2\.com [NC]
RewriteRule ^$ content.aspx?ID=56

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
clearchannel
Newbie
Newbie


Joined: 08 January 2008
Location: United Kingdom
Online Status: Offline
Posts: 36
Posted: 10 January 2008 at 8:54am | IP Logged Quote clearchannel

I use awstats for my websites and this website in particular.

After installing ReWrite I am guessing my stats program will record www.domain2.com/content.aspx?id= instead of www.maindomain.com/content.aspx?id etc ?

Before I buy the product, as I am new to this ISAPI thing Are there any other considerations I need to make or be aware of???

Thanks
Simon

Back to Top View clearchannel's Profile Search for other posts by clearchannel Visit clearchannel's Homepage
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6449
Posted: 11 January 2008 at 4:54am | IP Logged Quote Yaroslav

You are correct about logs. I don't see other considerations now. I only suggest you to install and configure everything before purchase.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 

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