Routing does not works in mobile!


I have a really strange problem using Slim 3.3 . I have putted the configurations of Slim right into the apache configuration . It works great in browser . But it does not work when I try to make a request through my mobile app . It instead returns apache’s default 404 not found page !
I am sure the url is correct because the exact same url works in my pc …

I thought maybe it’s because of User-Agent header but still after adding that the result is the same.

Can you please guide me to what to do to solve this problem ?

Server’s Response in mobile:

Not Found

The requested URL /v1/version was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Slim in it’s default config, doesn’t filter out mobile from desktop…

have you added any middleware that would do this?

1 Like

I found out the problem finally . After looking at the log of Apache I found out that the requests from mobile were not reaching the server at all . It was reaching another server !
I used direct IP Address to connect instead of a domain. I changed the underlying library I used for my http requests in android and it works correctly now.

So there was no fault on the server and Slim. Sorry for this stupid question I began to suspect everything when such a simple thing was not working.