Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Subdomain setup and menus View modes: 
User avatar
Member
Member
DahlinDev - 10/7/2013 10:56:36 AM
   
Subdomain setup and menus
I have a site that I want to have a couple pages be accessible via a subdomain.

Site: xyz.com

I want to have blog.xyz.com and support.xyz.com.

I want blog and support to be subfolders in the main site and have the same templates and everything. I know I can do all this with a domain alias and point it to that sub directory.

My question is: Is there a way to use a css list menu so the links for all the other pages always link back to the main domain even if you're on one of the sub domains?

When I tried setting it up, if I browsed to blog.xyz.com all the links in the menu would then be blog.xyz.com/page1, blog.xyz.com/page2, etc...

On top of having the menu link to the main domain I also don't want those other pages to even be accessible from the subdomain. So if the user were to browse to blog.xyz.com/page1 it would redirect them to the main domain or at worst throw a 404.

Thanks.

User avatar
Member
Member
kentico_sandroj - 10/9/2013 7:29:42 PM
   
RE:Subdomain setup and menus
Hello,

For configuring the sub-domains to always use the main domain you would have to modify the navigation Web part or create a your own navigation.

You may also be able to store the subdomains in the custom field and display the custom field instead.

As for redirecting from the subdomain, you would accomplish that through custom code that can be placed in ~/App_Code/Application/CMSHttpApplication.cs

Session_Start or Application_Start should work well.

Please let me know if you have any questions.

Best Regards,
Sandro