Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: newbie question on sub-domains Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ranger
Newbie
Newbie


Joined: 25 February 2010
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 25 February 2010 at 11:30am | IP Logged Quote ranger

Hi there,

We're using ISAPI Rewrite 2 in a hosted environment. There are number of sites that operate on it all of which use website/code in corresponding folders in the root. We've directed traffic to the relevant folder as follows:

RewriteCond Host: site1\.ourdomain\.com
RewriteRule (.*) /site1$1 [L]

RewriteCond Host: site2\.ourdomain\.com
RewriteRule (.*) /site2$1 [L]

The 3rd site however needs SEO URLs and the code sits in a third folder just as the two above but we can't figure out how to combine the SEO rules with the folder rules. So for example, we'd like to write a rule that rewrites site3.ourdomain.com/contact-us/ to site3.ourdomain.com/index.php?page=contact-us in conjunction with the rule below but nothing seems to work! No doubt due to lack of experience with this. Any help would be greatly appreciated! 

RewriteCond Host: site3\.ourdomain\.com
RewriteRule (.*) /site3$1 [L]

 

 

 

 

Back to Top View ranger's Profile Search for other posts by ranger
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10487
Posted: 26 February 2010 at 2:45am | IP Logged Quote Anton

Please try to have the following config:

RewriteCond Host: site1\.ourdomain\.com
RewriteRule (.*) /site1$1 [L]

RewriteCond Host: site2\.ourdomain\.com
RewriteRule (.*) /site2$1 [L]

RewriteCond Host: site3\.ourdomain\.com
RewriteRule /([^/]+)/ /index.php\?page=$1

RewriteCond Host: site3\.ourdomain\.com
RewriteRule (.*) /site3$1 [L]

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


Joined: 25 February 2010
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 26 February 2010 at 7:43am | IP Logged Quote ranger

Thanks Anton, that did the trick. Much appreciated.
Back to Top View ranger's Profile Search for other posts by ranger
 

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