lundi 27 juin 2016

Laravel redirect to mobile site

I have a situation where I want to do a redirect to a mobile site.

Here is the flow: I have a mobile friendly site and a desktop site (I know, better to have just one but my boss wants to slip test the two sites to see if the new one converts better). On mobile we want all traffic to land on the mobile site and on the desktop we want to a/b test the two sites and see which performs better.

To avoid getting hurt in SEO rankings, we want to keep the mobile site in an m.site subdomain so that Google doesn't hurt us.

My question is. What would be the best way to accomplish this? I had some ideas about using middleware to mobile detect and then redirect based on whether the user was on mobile or not, but I was wondering if anyone can suggest a better way to accomplish this.

I also thought of doing something on the controller level with the various view directories but since we want to maintain this as a separate site, swapping the views would probably not be the best way to make this happen. Any thoughts? Thanks in advance!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/28XD8P9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire