.htaccess file help

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
pthomas
Forum Commoner
Posts: 68
Joined: Wed Jan 19, 2005 11:28 am
Location: Cincinnati, OH

.htaccess file help

Post by pthomas »

I'm trying to figure out how to setup my .htaccess file in a sub directory to only allow the local apache web server to get to... say the sounds sub directory and not let clients freely browse or plugin the exact URL and download a specified file.

Feyd tipped me off to use the .htacces file and I found a few decent tutorials (most still suck) from googling, but I've still got a problem. I setup my .htaccess file to look like this:

Code: Select all

Options -Indexes
order deny,allow
deny from all
allow from 127.0.0.
The problem is that everytime the user refreshes the current page, it is supposed to grab a random sound file out of the sounds directory and play it. Well, with that .htaccess file in place as the code above is, it will sometimes play a sound file and sometimes not. Its completely random. If I remove the last 3 lines, then it always plays a sound file. File permissions are identical for each of the sound files. I'm at a loss here. I have no idea of the .htaccess file stuff I put above is even correct or not!

Help?
Paul
Post Reply