Conditional Content based on subdomain?

Search
Other Pre-Sale questions
Forum

Conditional Content based on subdomain?

Steve Wyant's Avatar Steve Wyant
We need the home page and a footer module to display different content based on the subdomain the visitor is coming from. Can the URL condition include the subdomain (sub1.example.com, sub2.example.com, etc.)?

If yes, can the URL condition include a wildcard, i.e. sub2.example.com/* ?
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, the URL condition includes the full domain.
You don't need wildcards in this case, as it just looks for whatever you tell it to inside the full URL.
So to make it show only on URLs containing 'sub2.example.com', just put that in the condition.
Please post a rating at the Joomla! Extensions Directory
Steve Wyant's Avatar Steve Wyant
Great, that's exciting to hear.

One more question, can the conditional content be a Modules Anywhere shortcode tag?
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, you can place any content or code as the 'content' part.
When using other plugin code, the order of the plugins can come into play.

See: regularlabs.com/blog/242-plugin-order-is-important
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in