I am using the domain module.
Only setup two domains (www.mysite.com & m.mysite.com).
All is working as expected and I have each domain on a separate theme.
If I visit www.mysite.com on a desktop it looks exactly like I want.
If I visit m.mysite.com on a phone it looks exactly like I want.
If I visit m.mysite.com on a desktop, it displays it and if I visit www.mysite.com on a phone is displays it… and they should not.
Here is my question…
How can I use this module to redirect based on the device?
Since the domain module already switches the theme based on the url, i do not really need the twig commands from this module to hide any blocks or anything based on device.
Instead, how can I use an if twig statement provided by this module to redirect to another domain?
For example.
On www.mysite.com custom theme, add something like… if mobile, redirect to m.mysite.com.
And on m.mysite.com custom theme, add something like… if tablet or desktop, redirect to www.mysite.com
Is this possible?
If so, what would that twig code look like?
Thank you for your time.
Needs work
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.