Restrict directory listing to only logged in users

You could try configuring your server to pass or “proxy” all requests to your directory through a php script that can check if the user is logged-in.

Check out the following answer for an example of how to do this:
https://wordpress.stackexchange.com/a/37743/48165

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)