Almost all PHP frameworks now recommend using the public directory as a starting point for receiving requests in the application.
And set them as a "Document Root" configuration on your websever.
However, it is not always possible to do this, especially when you use a shared hosting.
This .htaccess file will help you.
Just place this .htaccess file to your application root directory