Re: avoid server folder reading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Heyes wrote:
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.


Will that not result in an infinite redirection loop?
Or am i missing something very obvious !

--
Regards,
Anup Shukla

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux