|
|
|
Supreme 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.
|
|
|
|
|
Forum 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.
|
|
|
|
|
Supreme 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.
|
|
|
|
|
Support 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?
|
|
|
|
|
Supreme 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 RuppGreatTalents.com - Creative People. Together. (TM) Entertainment Industry and Talent Community.
|
|
|
|