Announcement

Collapse
No announcement yet.

How to hide the files located under the public_html like php.ini showing configuratio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to hide the files located under the public_html like php.ini showing configuratio

    How to hide the files located under the public_html like php.ini showing configuration contents if visited with URL's.

    If you want the hide any existing file located under the public_html of any account.

    If you access the URL as example.com/php.ini then it will show the configuration file with all the configuration settings done for the php.ini of the domain and which also have the changes to get hacked because the contents of the php.ini as visible with the simple URL itself, but if you want to hide the php.ini being located there then you need to add some of the codes into the .htaccess

    For example for the php.ini
    #vi .htaccess (at the end of the file add the codes)
    (For the file, put the code as )
    <Files php.ini>
    order allow,deny
    deny from all
    </Files>
    (For the folder, put the code as)
    <Directory php.ini>
    order allow,deny
    deny from all
    </Directory>
    :wq!
    (Save and Quit)
    And then try to access the URL example.com/php.ini you will get the forbidden error message for the same

    Thats it, Done !!!

  • #2
    That's a nice piece of info, thanks for sharing
    Rock _a.k.a._ Jack Daniel

    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    Comment

    Working...
    X