[ad_1]
I’m racking my brain on this. I could just make it a soft 404 by hiding everything on mobile and adding a fake “Error 404 page not found” title at the top of the page, but I would prefer it if the page actually returned 404 when the user was on a mobile device. I don’t think the soft 404 will work for what I’m trying to do.
I’m thinking PHP is the only answer, but I’m hoping there’s an easier way to implement it. Let me know if you have any ideas. Thanks.
[ad_2]
Would a redirect based on device work?
I don’t have the answer but I got curious, searched around, and found someone who is encountering this behavior: https://stackoverflow.com/questions/19782827/404-error-when-viewing-blog-post-on-mobile-device
That doesn’t necessarily make the original page return a 404, though. If I find anything else that seems promising I’ll share it!
Something with user-agent will likely get the job done, server or clientside (PHP)