Not sure how to better phrase the title.
We have an iOS game which connects with a MySQL database on our VPS via PHP. Now we don’t know a great deal about the server side of things, so we got it all working, the game is released and people are able to update their scores etc.
The problem is that the only way we were able to get it all to work was to put our game directory into our public_html directory. This means that if anyone types http://www.ourwebsitename/gamefoldername into a browser they get the index of that folder. If you click one of the folders in there, it actually returns a table with all of the data in our database, which is obviously not secure.
Is there a way to make this directory private, and if so how would this affect our app when it tries to connect to the server?
There are alots of way to prevent this :
Some are below.
1) Put a index.php in this and every folder http://www.ourwebsitename/gamefoldername and this file should redirect the user who provide this url to main/login page. This is simple but not a great way.
2) Use . ht access file http://www.htaccess-guide.com/redirects/ . Please get details from here.