I have found that if I use the below typoscript I can redirect my users to the mobile version of the site which has its own tree in the backend of my typo3 site.
[useragent = *iPhone*]||[useragent = *iPod*]||[useragent = *Android*]
config.additionalHeaders = Location: http://m.example.com/
[end]
It is a simplified version of the site however so I want to have a return to full website link. But due to my above typoscript redirecting users to the m domain i can't get back to www.example.com.
Does anyone have any typoscript suggestions here?
You need an additional parameter in your link back which you can use to turn off the redirection.
Try something like this:
# check for mobile browser
[useragent = *iPhone*]||[useragent = *iPod*]||[useragent = *Android*]
config.additionalHeaders = Location: http://m.example.com/
[global]
# undo mobile redirect if mobile param is set
[globalVar = GP:nomobileredirect > 0]
config.additionalHeaders =
[global]
and redirect to http://www.example.com/?nomobileredirect=1 on your link back.
To keep a nomobileredirect-value in all generated links, add nomobileredirect to your linkVars, e.g.
config.linkVars = nomobileredirect,L
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With