Re: avoid server folder reading
| From: | Anup Shukla | Date: | Sun, 20 Jan 2008 11:31:49 +0000 |
| Subject: | Re: avoid server folder reading | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267702@lists.php.net to get a copy of this message | ||
Richard Heyes wrote:
Will that not result in an infinite redirection loop? Or am i missing something very obvious ! -- Regards, Anup ShuklaI 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: <?phpheader('Location: /');?> If it's index.html, you could use the following: <script type="text/javascript"> <!--location.href = '/';--> </script> Try the PHP version first.