I sent 301 when using Vary to specify request header fields that lead to this server -driven negotiation solution.
So, assuming the User-Agent header field is used to distinguish whether the request was made by the mobile device, I would use this:
HTTP/1.1 301 Moved Permanently
Vary: User-Agent
Location: http://m.example.com/...
Gumbo source
share