Listener

To have both your full and mobile site be in the same environment this bundle comes
with an event listener. The listener compares the current request's host name to the
mobile_host you set in your config.yml. If a match is found the manager's
mobile flag is set to true.

Enable/Disable the listener in your config.yml:

zenstruck_mobile:
use_listener: true/false

Twig Helper

There are twig functions that allow you to generate your full/mobile urls.

Will render the MyBundle:Default:index.html.twig template as normal on full
site but on a mobile request it will look for MyBundle:Default:mobile/index.html.twig.
If found it will render the mobile template, if not, it will render the default full one.
Simply create a mobile folder in the same directoy as your full template and create a
template with the same name in it.

Enable/Disable the custom twig engine in your config.yml:

zenstruck_mobile:
use_twig_engine: true/false

Full Default Configuration

Reference

Possible settings for .htaccess to handle mobile detection and redirect. This
also allows a mobile device to override the redirect if a cookie is set. See the
Twig Helper example above to see how to set the mobile parameter.