suncat2000 / MobileDetectBundle

Symfony 2/3/4 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
398 stars 153 forks source link

Add desktop detect & redirect? #43

Closed williamMarx closed 10 years ago

williamMarx commented 10 years ago

Would it be possible to add a redirect parameter to the config that enables redirection for desktop devices as well? Something like:

mobile_detect: redirect: mobile: ~ tablet: ~ desktop: is_enabled: true host: http://site.com status_code: 301 action: redirect switch_device_view: ~

This configuration would be used on a dedicated mobile site (e.g. http://m.site.com) so that it could redirect desktop traffic to the full site (e.g. http://site.com).