SaaS CMS has officially launched! Learn more now.

Link to different websites based on which domain you are currently on.


I am using a multi-site CMS 12 solution, which has 3 different domains configured in the Manage Websites section all using the same folder structure and content. 
I'll call them
I also have other applications that share a similar environment setup with 3 QA sites configured.
If the user is browsing on, I want a LinkItem or Url property that directs to the Wordpress Site to go to Similarly if they are on i want them to be directed to
What is the best way to achieve this?

Apr 08, 2023 14:54

Sounds like you need to write a custom htmlhelper to house your rewriting logic.

Apr 09, 2023 11:24

Thanks Surjit. Do you have any links to a solution with similar rewrite logic?

Apr 11, 2023 15:32

Take a look at the extension method Url.ContentUrl, you could write your own version of it and have your rewrite logic in there. I believe there's two version of it, one for ContentReferences and the other for the Url property.

Apr 11, 2023 23:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.