Re: Permalinks and the new demand for separate Mobile Sites.

By MercerDesign - April 25, 2023

In response to: https://www.interactivetools.com/forum/forum-posts.php?postNum=2236737#post2236737

Was this resolved, I have the same issue, I need to have a separate mobile site due to the design of the site so will need the permalinks to work on the desktop version and in the mobile version as well.

By Dave - April 27, 2023

Hi MercerDesign, 

It's possible, but you'd need to think through how it would all work.  It can be tricky maintaining two different copies of the same site.

But assuming you had mobile.example.com and www.example.com pointing to the same website.  Such that they returned the exact same output for every query.  You could then test which hostname was being used with $_SERVER['HTTP_HOST'] and show a different "wrapper" of the same content based on the hostname the user accessed the site from.

You may want to consider if there were any SEO implications of that, though, and any other issues.

One way to move forward would be to start at the end and imagine how you'd want both sites structured and then work backwards to see how to implement with permalinks or by other means.

I hope that helps point you in the right direction.  Let me know any other questions!

Thanks
Dave

Dave Edis - Senior Developer
interactivetools.com