1

My Laravel VueJS Application work fine in local server. But when I uploaded it to the shared hosting, it gives problem with url.

In local environment, the code works fine with:

axios.get('/api/get/users')

But, in production server, since it is shared hosting, codes need to be change like:

axios.get('http://www.example.com/public/myApp/public/api/get/users')

Is there any way to use same url on local & production server without changing?

Dipen Chand
  • 95
  • 11
  • I don't see why you should change on the production server – Core972 Jun 04 '19 at 14:02
  • Because it is hosted on shared hosting so, it results 404 error... When I track url... it shows `http://www.example.com/api/get/users` Instead of `http://www.example.com/public/myApp/public/api/get/users` – Dipen Chand Jun 04 '19 at 14:14

0 Answers0