This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Will ISAPI_Rewrite solve my problem?
Author
Message |
LilMoke
Newbie


Joined: 14 July 2006
Location: United States
Posts: 13
Posted: 15 October 2010 at 8:47am

Hello,

I use ISAPI_Rewrite with much success on one of my sites, however, I have a new issue and I think it will solve my problem, but I wanted to verify before I undertake the project.

Here is my scenario:

I have one main website: www.mysite.com

I have several other sites such as: www.myLOCATIONsite.com

Due to several issues, most important session vars and cookies across domains

I was hoping I could use rewite rules so that if the user goes to on of the LOCATION sites, I could redirect them to mysite and have the URL show that they are at LOCATION.

The issue is that I cannot login the user at the main site and have him access the functions of the other sites.  Now my site is one app that uses HOST HEADERS to determine which site the user initially came from.

I was hoping I could have the user:

1) www.myLOCATIONsite.com

2) I would detect this and redirect them to www.mySITE.com but the URL would show myLOCATIONsite.com

3) I could create cookies, sessin vars, login, etc. and do everything as if the user was at mySITE.com, but it would appear to them that they were at myLOCATIONsite.com

I hope this all makes sense as it is very hard for me to put it into words what I am trying to accomplish.

Any help would be greatly appreciated!!

Thanks,

Tony

 

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 18 October 2010 at 3:27am

Yes, this is possible with ISAPI_Rewrite.
The only thing I must know for sure before I provide you with the rules, is whether you are using ISAPI_Rewrite 2 or 3.

__________________
Regards,
Anton
Back to Top
 
LilMoke
Newbie


Joined: 14 July 2006
Location: United States
Posts: 13
Posted: 18 October 2010 at 6:01am

Thanks for the reply...

I am using ISAPI_Rewrite 3... here is the top of my confi:

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.73

 

Thanks for the assistance!!

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 18 October 2010 at 8:10am

Ok, then the config you need will look like this:

RewriteBase
RewriteCond %{HTTP_HOST} ^www\.myLOCATIONsite\.com$
RewriteRule (.*) http\://www.mySITE.com$1 [NC,P]

__________________
Regards,
Anton
Back to Top
 
LilMoke
Newbie


Joined: 14 July 2006
Location: United States
Posts: 13
Posted: 18 October 2010 at 2:35pm

Anton,

 

That's awesome, thanks!!

One more question, though... since I have 22 LOCATIONsites, is it possibly to have a condition based on the HTTP_HOST?

Or somehow have it conditional based on where they are tyring to go.

 

ALso, you can see what I am trying to do, live at http://www.mycitybaby.com that is the main site... then you can got to any one of the city sites, such as http://www.mylababy.com or http://www.mydallasbaby.com etc.

 

So if a user goes to any of those city sites, then I want to direct them back to mycitybaby.com so my code thinks everything is the same domain, but the user sees there own city site.

 

Does that make sense?

 

Thanks,

Tony

 

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 19 October 2010 at 2:19am

Yes, I got what you want.
You can try to do it like this:

RewriteBase
RewriteCond %{HTTP_HOST} !^www\.mycitybaby\.com$
RewriteRule (.*) http\://www.mycitybaby.com$1 [NC,P]

__________________
Regards,
Anton
Back to Top
 

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

Printable version Printable version
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