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

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 and 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!


Dave Edis - Senior Developer

By Codee - April 27, 2023

What is causing the "demand for separate mobile sites" you mentioned in your post? Is it a demand from the search engines (Google), the customer, or someone or something else?  Like Tim Forrest referenced in a reply to the original post, one set of code may be easier to maintain (especially if you ever have the need to move the site to a different host)...and reference the adapting screen size/device changes in the css structure or as part of the framework.