This is a little difficult to explain, but let me try.

I've built a portal site with three separate domains that share the same system folder. So the portal_domain uses "./system/" and the other child domains are housed in subdirectories, so portal_domain/child_domain/ uses "../system/".

I built it this way, so members could log into one central system and manage content on three separate sites without having to jump from one system to another.

It works great, except for one thing. I'd like to make some redirects based off the url you are using, but it doesn't matter what the base url is, the system only sees the current_url as the base.

I want to be able to say if you go to a child domain, redirect to a custom home page for that child domain, but I can't find any way to target that.

If you visit the portal domain http://portal-domain.com 
the code {current_url} yields http://portal-domain.com

And if you visit the child domain https://child-domain 
the code {current_url} still yields http://portal-domain.com

Is there any way around this?

1 Answer 1


You could try building your own domain based on what is in the browser rather than what EE is currently serving. One way to do this might be to build something using tags available from the very handy URL Helper add-on.

This add-on provides a tag {host} which according to the documentation gives Your domain name, e.g. localhost, site.com. So might be worth trying this to create your links, with suitable slugs appended to give a path to your respective home pages.


  • I've tried URL Helper. {host} still returns the portal domain. Jun 24, 2019 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.