|
Home > Archive > Apache Server configuration support > December 2007 > How to allow downloads without allowing indexes?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to allow downloads without allowing indexes?
|
|
| CptDondo 2007-12-15, 1:24 pm |
| I have a directory with a lot (thousands) of files. I allow users to
download these files via links on my website.
I want to prevent people from indexing this directory, but I want to
allow anyone to download provided they know the filename.
Is this possible?
--Yan
| |
| Brendan Gillatt 2007-12-15, 1:24 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
CptDondo wrote:
> I have a directory with a lot (thousands) of files. I allow users to
> download these files via links on my website.
>
> I want to prevent people from indexing this directory, but I want to
> allow anyone to download provided they know the filename.
>
> Is this possible?
>
> --Yan
Put
Options -Indexes
in a .htaccess file.
- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup...arch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
iD8DBQFHZBiXkA9dCbrNdDMRAmo3AKC369BZkocg
4+nf1iWZiJLJFpxkYgCfWhob
JuweZM4jasacH4+UKoe0N3E=
=0OYv
-----END PGP SIGNATURE-----
| |
| Kees Nuyt 2007-12-15, 7:22 pm |
| On Sat, 15 Dec 2007 16:31:48 -0000, CptDondo
<yan@NsOeSiPnAeMr.com> wrote:
>I have a directory with a lot (thousands) of files. I allow users to
>download these files via links on my website.
>
>I want to prevent people from indexing this directory, but I want to
>allow anyone to download provided they know the filename.
>
>Is this possible?
>
>--Yan
Sure.
It is Apache, not the users themselves that do the
indexing, and you can tell Apache to stop auto-indexing.
Issue the directive
Options -Indexes
either in the .htaccess
or in the <Directory /your/dir> block in httpd.conf.
Make sure you have
DirectoryIndex index.html
somewhere and put an index.html document in that directory
with just the contents and hyperlinks you do want them to
see.
--
( Kees
)
c[_] The desire to become a politician should bar you
for life from ever becoming one. (Billy Connolly) (#232)
|
|
|
|
|