Knowledgebase

Protecting the php.ini File From Being Viewed Print

  • 0

To prevent people to viewing your php.ini file via a browser a few lines need to be pasted into the .htaccess file.

  1. Log in to your RCS Account Manager.
  2. Once logged in, find and click the Hosting tab on the left side of your Account Manager dashboard.
  3. Choose the Hosting Package name you want to manage under the All My Hosting Packages section. 

    • If you have multiple Hosting packages on your account, click the MANAGE button on the Hosting package you want to manage.

    • If you only have a single Hosting package on your account, you will be rerouted to the Hosting Overview page. 

  4. Click on the FILE MANAGER button under the Quick Links section.
  5. Select the checkbox to view hidden files.
  6. Double-click on the public_html folder to open it
  7. Right-click on the .htaccess file and then select the "Edit".
  8. 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. This change prevents PHP hackers from finding exploits on your site.


Was this answer helpful?
Back

Powered by WHMCompleteSolution