dqaxw44567 2016-06-27 13:04
浏览 88

Laravel重定向到移动网站

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!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!
    • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮