.ENV file is visible

前端 未结 4 1476
再見小時候
再見小時候 2021-02-19 03:45

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.

<
4条回答
  •  不要未来只要你来
    2021-02-19 04:16

    You can add below code in .htaccess file to disable directory listing and restrict access of .env file:

    # Disable Directory listing
    Options -Indexes
    
    # block files which needs to be hidden, specify .example extension of the file
    
        Order allow,deny
        Deny from all
    
    

提交回复
热议问题