Re: [PHP] avoid server folder reading

2008-01-21 Thread Eric Butera
On Jan 20, 2008 6:13 AM, Richard Heyes [EMAIL PROTECTED] wrote: If your server's default file is index.php, you could use the following in an index.php file: ?php header('Location: /'); ? You really shouldn't use relative paths in a header location.

Re: [PHP] avoid server folder reading

2008-01-20 Thread Alain Roger
this is what i already did before asking :-) On Jan 19, 2008 7:53 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 19, 2008 1:46 PM, Alain Roger [EMAIL PROTECTED] wrote: Sorry if my post was not clear... in fact i would like to hide the contant of my webfolders and avoid user to see

Re: [PHP] avoid server folder reading

2008-01-20 Thread Richard Heyes
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

Re: [PHP] avoid server folder reading

2008-01-20 Thread Anup Shukla
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

Re: [PHP] avoid server folder reading

2008-01-20 Thread Richard Heyes
Will that not result in an infinite redirection loop? Or am i missing something very obvious ! If it's placed in the root folder of the website, yes. But why do that? If, however, that's what is required just put an empty index.html file there. -- Richard Heyes

[PHP] avoid server folder reading

2008-01-19 Thread Alain Roger
Hi, 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. thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 12:57 PM, Alain Roger [EMAIL PROTECTED] wrote: Hi, 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. you could take the code

Re: [PHP] avoid server folder reading

2008-01-19 Thread Jochem Maas
Alain Roger schreef: Hi, I would like to know how to avoid (using PHP code) any user to read the content of my website folder ? what exactly are you trying to avoid being read? and in what context? as my website is hosted by and external company, i do not have access to apache conf file.

Re: [PHP] avoid server folder reading

2008-01-19 Thread Richard Lynch
On Sat, January 19, 2008 11:57 am, Alain Roger 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. You're not making a lot of sense, really...

Re: [PHP] avoid server folder reading

2008-01-19 Thread Alain Roger
I should be able to setup a .htaccess file. On Jan 19, 2008 7:17 PM, Jochem Maas [EMAIL PROTECTED] wrote: Alain Roger schreef: Hi, I would like to know how to avoid (using PHP code) any user to read the content of my website folder ? what exactly are you trying to avoid being read?

Re: [PHP] avoid server folder reading

2008-01-19 Thread Alain Roger
Sorry if my post was not clear... in fact i would like to hide the contant of my webfolders and avoid user to see the index of folders... for sure users should be able to browse the website, but not to see its structure by browsing the index :-) On Jan 19, 2008 7:41 PM, Richard Lynch [EMAIL

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 1:46 PM, Alain Roger [EMAIL PROTECTED] wrote: Sorry if my post was not clear... in fact i would like to hide the contant of my webfolders and avoid user to see the index of folders... for sure users should be able to browse the website, but not to see its structure by

Re: [PHP] avoid server folder reading

2008-01-19 Thread Jochem Maas
Nathan Nobbe schreef: On Jan 19, 2008 1:46 PM, Alain Roger [EMAIL PROTECTED] wrote: Sorry if my post was not clear... in fact i would like to hide the contant of my webfolders and avoid user to see the index of folders... for sure users should be able to browse the website, but not to see its

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 3:08 PM, Jochem Maas [EMAIL PROTECTED] wrote: or alternatively use that .htaccess to deny apache index listings. i of course use .htaccess, but OP was asking for a php based solution, so thats what i supplied, thats all. -nathan

Re: [PHP] avoid server folder reading

2008-01-19 Thread Jochem Maas
Nathan Nobbe schreef: On Jan 19, 2008 3:08 PM, Jochem Maas [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: or alternatively use that .htaccess to deny apache index listings. i of course use .htaccess, but OP was asking for a php based solution, so thats what i supplied, thats all. my

Re: [PHP] avoid server folder reading

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 7:50 PM, Jochem Maas [EMAIL PROTECTED] wrote: my reply was to the OP, not you as such, given that your also answering his question, sorry for the misunderstanding. i think half the time i get confused myself; like this morning when you said show us your exact code, to the OP

Re: [PHP] avoid server folder reading

2008-01-19 Thread Casey
On Jan 19, 2008 6:36 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 19, 2008 7:50 PM, Jochem Maas [EMAIL PROTECTED] wrote: my reply was to the OP, not you as such, given that your also answering his question, sorry for the misunderstanding. i think half the time i get confused myself;