PHP Magic Book – Free PHP Scripts, Tutorials and Downloads, PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips

Protect php dot ini file from being viewed

Prevent people to view your php.ini file via a browser a few lines needed to be put into the .htaccess file.

Locate your .htaccess file which will be in your site’s root directory (public_html or www)
Download and edit .htaccess
Paste the following code into the bottom of the file and then click save:

<files php.ini>
Order allow,deny
Deny from all
</files>

Now your php.ini file is protected and which can help php crackers from finding exploits on your site.

  • Share/Bookmark
Tags:
Posted in: Security
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0

Related Posts




Comments for this entry are closed at this time.

  Subscribe Via RSS
  Subscribe Via Email