Web Hosting Talk







View Full Version : htaccess again.


-Edward-
11-09-2000, 02:54 PM
Whatd does this do?.
<files "*">

</files>

Canuck
11-09-2000, 04:12 PM
I don`t think it does anything unless you add a directive.
<Files *>
deny from all
</Files>
wouldn`t let a user into the directory to view the files .
or
<Files *.txt>
deny from all
</Files>
for only certain file extensions.

sodapopinski
11-10-2000, 04:56 AM
I was wondering how to block a few of file extension.
For example I would like to block my users to view the *.zip *.tar *.rar files.

I have already tried to put the following command:
<Files *.zip *.tar *.rar>
deny from all
</Files>

and got 500 server internal error.

Also I have already try the other way (put the following command):

<Files *.rar>
deny from all
</Files>

<Files *.tar>
deny from all
</Files>

<Files *.zip>
deny from all
</Files>

and still, got 500 server internal error :(
Anybody know how to do that?

Thx.
Soda

elsmore1
11-10-2000, 12:05 PM
I think the following will do what you want...

<Files ~ "\.(zip|tar|rar)$">
Deny from all
</Files>