I have a web application. It's back-end is in PHP. There are some directories inside the application. Some of the directory has index.php file. The Problem is when I am trying to route users to other .html pages in the same directory it's working fine. Now one of the directory has index.php file and in the link I have given the relative path to the folder (So by default it is loading index.php file in that directory from Desktop,Labtop etc) but it is not loading that page when I try to run the same from any mobile browser. After Inspection I realized that I can see somefolder/index.php in the address bar while in mobile it is just till the somefolder i.e it is not trying to load index.php file due to which I get "Not Found" 404 error
You have to set your DirectoryIndex correctly. When calling the directory from an web accessible URL without any file name, it tries to access your DirectoryIndex file, per default it is called index.php, index.html, index.htm, index.cgi etc.. This depends also on your platform. Different systems have different default DirectoryIndex configurations. If those index file does not exist, you should see the directory listing in the web browser, even if the web server user has the rights to list the content of the current directory (special bit under Linux/UNIX and maybe protected by advanced kernel security applications like selinux or AppArmor).
What happens, if you try to access the folder directly without any file name from an desktop browser? Will you get there the HTML output of index.php?