Connecting Tech Pros Worldwide Help | Site Map

php - htaccess

  #1  
Old July 17th, 2005, 02:30 PM
Geradeaus
Guest
 
Posts: n/a
On my webhosting I don't have access to a root directory, so I am stuck in
the public folder.

I should secure the downloads folder, this is why I wanted to use a
..htaccess file.

Only, PHP should have access to this folder..because users login using a
username and password from the database.

How can I make an htaccess file which allows the "php-user" to access the
files in the folder on a Linux webserver?

Thanks in advance!
Ben


  #2  
Old July 17th, 2005, 02:30 PM
Dmitry Lukashin
Guest
 
Posts: n/a

re: php - htaccess


PHP read files directly from filesystem, .htaccess can't deny access for PHP

On 2005-06-07, Geradeaus <gehegeradeaus@hotmail.com> wrote:[color=blue]
> On my webhosting I don't have access to a root directory, so I am stuck in
> the public folder.
>
> I should secure the downloads folder, this is why I wanted to use a
> .htaccess file.
>
> Only, PHP should have access to this folder..because users login using a
> username and password from the database.
>
> How can I make an htaccess file which allows the "php-user" to access the
> files in the folder on a Linux webserver?
>
> Thanks in advance!
> Ben
>[/color]
  #3  
Old July 17th, 2005, 02:30 PM
chotiwallah
Guest
 
Posts: n/a

re: php - htaccess


if i understand right you want to prevent people from downloading via a
direct link in your download dir. two ways to prevent that:

1. put your downloads in a database

2. use .htaccess to deny any http access to download dir and have php
read and deliver the downloads via the file system (which is not
affected by .htaccess, as dmitry wrote already), using i. e. readfile()

micha

  #4  
Old July 17th, 2005, 02:30 PM
Geradeaus
Guest
 
Posts: n/a

re: php - htaccess



"chotiwallah" <chotiwallah@web.de> schreef in bericht
news:1118216549.071878.23350@g49g2000cwa.googlegro ups.com...[color=blue]
> if i understand right you want to prevent people from downloading via a
> direct link in your download dir. two ways to prevent that:
>
> 1. put your downloads in a database
>
> 2. use .htaccess to deny any http access to download dir and have php
> read and deliver the downloads via the file system (which is not
> affected by .htaccess, as dmitry wrote already), using i. e. readfile()
>
> micha[/color]

thanks for your advice, how could I not think about that...


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
php-5.2.5 compile error with xmlrpc Benjamin Grieshaber answers 0 December 4th, 2007 12:35 PM
error while doing 'make' in php-5.2.1 tsivaraman@gmail.com answers 0 February 12th, 2007 03:35 PM
php extensions and windows... specifically extension_dir Chris Paul answers 3 December 5th, 2005 12:45 AM
using php to populate a <ul Japhy answers 4 October 4th, 2005 07:05 PM
why can't i reach www.php.net? lawrence answers 3 July 17th, 2005 12:50 AM