Re: avoid server folder reading

From: Date: Sun, 20 Jan 2008 11:13:52 +0000
Subject: Re: avoid server folder reading
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-267701@lists.php.net to get a copy of this message
I would like to know how to avoid (using PHP code) any user to read the content of my website folder ? as my website is hosted by and external company, i do not have access to apache conf file.
If your server's default file is index.php, you could use the following in an index.php file: <?php
    header('Location: /');
?> If it's index.html, you could use the following: <script type="text/javascript"> <!--
    location.href = '/';
--> </script> Try the PHP version first. -- Richard Heyes http://www.websupportsolutions.co.uk Knowledge Base and Helpdesk software that eases your support burden and helps increase your sales. ** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **

« previous php.general (#267701) next »