Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Multiple domains on shared hosting Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nukefusion
Newbie
Newbie


Joined: 22 June 2010
Online Status: Offline
Posts: 1
Posted: 22 June 2010 at 3:51pm | IP Logged Quote nukefusion

Hi,
I hope someone can help me. I've spent hours looking at
similar threads but I cannot wrap my head around these
regular expressions or the terminology.
I have two sites and two domain names:

Site1 = www.mysite1.com
Site2 = www.mysite2.com

I quite simply want to save money by hosting both on the
same server (it's shared hosting). I've got both domains
pointing to my account so when I type in either domain I
get taken to the web root of my server.
I would like to redirect www.mysite1.com to subfolder
/site1 and www.mysite2.com to subfolder /site2. I'd like
it to be invisible to the user, so it's as if there are
two distinct web sites.

How can I achieve this using Rewrite V2 on IIS?

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


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 23 June 2010 at 5:50am | IP Logged Quote Anton

The rules for ISAPI_Rewrite 2 will be:

[ISAPI_Rewrite]

#Emulate site1
RewriteCond Host: (?:www\.)?site1\.com
RewriteRule (.*)   /site1$1 [I,L]

#Emulate site2
RewriteCond Host: (?:www\.)?site2\.com
RewriteRule (.*)   /site2$1 [I,L]

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

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