Another redirect request
Hi, I want to implement a redirect on a generic blog page back to either the community front page or the parent category page.
This is because the category page serves the same content so a blog page without a filter in place will have the same content and therefore possibly create an SEO issue with duplicate pages.
ChiaraS kindly pointed out yesterday that we couldn't use a webuisupport request in the PI tab (although one Lithium example here uses this method: http://community.lithium.com/t5/Developers-Knowledge-Base/Using-a-FreeMarker-Page-Initialization-Script/ta-p/125767) but I can't see any other way of achieving this so I tried it on the off chance it might work, it didn't.
I want to keep the bg-p if there is either a username or label-name in the URL so I tried this:
<#if coreNode.id == "en" > <#if page.name == "BlogPage"> <#if webuisupport.path.parameters.name.get("label-name","") == ""> <#if webuisupport.path.parameters.name.get("user-id","") == ""> ${http.response.setRedirectUrl(community.urls.frontPage)} ${http.response.setRedirectStatus(301)} </#if> </#if> </#if> </#if>
I could separate the label-name and user-id checks into 2 separate redirect requests but I don't think that will make a difference right?
Anyone help?
Thanks,
Dom