InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Multiple Domains Expand / Collapse
Author
Message
Posted 10/03/2006 13:52:07


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Customers
Last Login: 05/01/2009 03:52:27
Posts: 106, Visits: 341
Hello, folks...long time to thread from me    All is well with my forum since I got all the issues taken cared of by Ryan and team. Thanks.  The only thing pending is the spelling button JS error issue on asp.net 2.0, but heard that will be fixed in v4.1.4 (btw, when is that going to be released?)

Anyway, I'm back to tickle your brain a bit.  I have multiple domains that point to the same IP address. CrystalTech calls them "domain pointer".

My main domain is http://www.martialweb.com/forums/

I have a domain "SportKarate.com" that points to the same IP address as my main one.  Unfortunately, I noticed from search engines that they also have my forum listed as http://www.sportkarate.com/forums/ .  How do I change IF so if the domain is not "martialweb.com", it redirects it to the correct domain and path?

For example: 
If the path from Yahoo is http://www.sportkarate.com/forums/Topic90-34-1.aspx, it like it to redrect immediately to http://www.martialweb.com/forums/Topic90-34-1.aspx

I have 4.1.3 but not a developer version.

----------------------------------------------
Scott Rupp

GreatTalents.com - Creative People. Together. (TM)
Entertainment Industry and Talent Community.


 

Post #10329
Posted 10/03/2006 18:53:46
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Customers
Last Login: 03/06/2006 09:25:12
Posts: 3, Visits: 16
If you dont use the root of the domain just set up the web site in IIS and on the Home Sirectory tab choose the "A redirection to a URL" option, type in the URL and check the "A permanent redirection for this resource". As both have the same directory name DO NOT check the "The exact URL entered" and do not add the directory to the URL given in the Redirect To box.
Post #10331
Posted 14/03/2006 11:14:06


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Customers
Last Login: 05/01/2009 03:52:27
Posts: 106, Visits: 341
I dont' have the ability to make these changes. 

In my site, outside the forum, I have implemented a code that checks the URL and corrects it if it's not the main domain, www.martialweb.com.  I need to implement something similar inside the Forum.  I tried including a user control in the MasterTemplate but was just giving me errors.

Can anyone help with this code?

----------------------------------------------
Scott Rupp

GreatTalents.com - Creative People. Together. (TM)
Entertainment Industry and Talent Community.


 

Post #10370
Posted 15/03/2006 11:36:59


Support Supremo

Support SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport Supremo

Group: Customers
Last Login: 13/11/2008 12:44:07
Posts: 568, Visits: 2,507
MartialWeb (3/14/2006)
I dont' have the ability to make these changes. 

In my site, outside the forum, I have implemented a code that checks the URL and corrects it if it's not the main domain, www.martialwe.com.  I need to implement something similar inside the Forum.  I tried including a user control in the MasterTemplate but was just giving me errors.

Can anyone help with this code?

Hi MartialWeb,

Could you please post in this topic the code you're trying to include in the MasterTemplate?

Post #10383
Posted 01/04/2006 00:31:01


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Customers
Last Login: 05/01/2009 03:52:27
Posts: 106, Visits: 341
Hi Carlos.  I figured it out a couple of weeks ago.  But in case someone else is trying to do the same thing...I just added this code in my master template right after <InstantASP:Form...

<InstantASP:Form id="Form" method="post" runat="server">

<%

'Check what domain is being used. If not the main domain, redirect to it.

Dim strMWCServer As String = Request.ServerVariables("SERVER_NAME" ).ToString().ToLower()

' "master" is the computer name

If strMWCServer <> "master" And strMWCServer <> "localhost" Then

'Production mode. Make sure it pointed to the correct domain

If (strMWCServer.IndexOf("yourdomain.com" ) < 0) Then

Dim strMWCURL = "http://www.yourdomain.com" & _

Request.ServerVariables("URL" ).ToString() & "?" & _

Request.QueryString.ToString()

'Redirect user

Response.Redirect(strMWCURL)

End If

End If

%>



----------------------------------------------
Scott Rupp

GreatTalents.com - Creative People. Together. (TM)
Entertainment Industry and Talent Community.


 

Post #10530
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 6:40pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.109. 9 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.