0

I have a client project with the requirement that a user visits a single URL. Then using PHP detect what device they are on and provide them with a different Vue js app dependant on device.

The issue is that the client is adamant that regardless of the app/device that the user is on, they must have the same URLs. Otherwise it would be easier to host each app on separate subdirectories.

Is there a way to have more than one Vue js app live on the same URL such as www.example.com?

1
  • Why can't you? Grab the user agent with PHP and direct them to the correct view. Commented Jun 22, 2018 at 14:04

1 Answer 1

1

Could be as simple as this, in index.php

<?php

if (isMobile())
{
  require("mobile.php");
}
else
{
  require("desktop.php");
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.