Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Using a sub domain for single area of website View modes: 
User avatar
Certified Developer 8
Certified Developer 8
richard - 3/14/2013 3:57:00 PM
   
Using a sub domain for single area of website
I have a website structured thus

www.abc.com/
www.abc.com/services
www.abc.com/services/businesssales/

What I need to do is if people go to businesssales.abc.com they are taken to
businesssales.abc.com/ which points to businesssales.abc.com/services/businesssales/ (I can do this using a domain alias with default alias set for the domain)

Hers the rub - they should not be able to do is navigate the rest of the site on this subdomain.

The navigation links on businesssales.abc.com/services/businesssales/ needs to take the user back to the main domain.

I hope this makes sense to someone. I am kind of assuming that I will need to change app_code/globabl.asax.cs in the Application_BeginRequest but not quite sure how to do it to rewrite the www.abc.com/services/businesssales/ to businesssales.abc.com/services/businesssales/

Thanks team

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 3/14/2013 5:14:53 PM
   
RE:Using a sub domain for single area of website
Hi Richard,

You can use the "Random Redirection" webpart on businesssales pages. And in the "Redirection Url field" redirect the page as below:
http://businesssales.abc.com{%relativepath%}


You can also write an macro if conditon in the webpart to check the domain name.
e.g.: apply the redirection only if the domain name is "www.abc.com"

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/14/2013 7:01:17 PM
   
RE:Using a sub domain for single area of website
Hi,

The above post sounds good too. I am not sure if it will cover all the possible scenarios. going the way in Application_BeginRequest should be bullet proof. You will need to check the current request URL, set some conditions according to the URL and do the redirection in code if necessary.

Best regards,
Juraj Ondrus