I am using Laravel 5.1
I recently uploaded my project in shared hosting. but when i browse http://siteAddress.com/local/.env
my .env file is visible.
Please create a .htaccess
file where you have .env file and write the code as shown below:
# STRONG HTACCESS PROTECTION
order allow,deny
deny from all
satisfy all
Then try to hit the .env file from url and it will not be available and show codes inside.
If you want to remove it from github.
Please create new file .gitignore on the same directory.
and add line
.env