XtremeMaC Posted January 20, 2005 Posted January 20, 2005 hi therei'm trying to hide certain files from getting viewed from the index. i've some file types that are to be read by the server but i don't want them to be seen from the index.. users view the index through a php. how can i accomplish this?thanks
Pointer1 Posted March 15, 2005 Posted March 15, 2005 If you are using a computer using Apache, there are two files to use .htaccess and .htpasswd -> .htaccessAuthUserFile "path to .htaccess and .htpasswd"/.htpasswdAuthName PasswordAreaAuthType Basicrequire valid-user.htpasswdusername:passwordIn the case that you are not running the server, put these two files in the directory(s) you want protected. You have to change the first line in the .htacces to conform to your directory in each instance. The .htpasswd part you need to have just a normal username, but the password needs to be in the cool *nix style. Using something like this web page http://spectrum.troyst.edu/password/ . When working properly, the person should recieve a prompt to have a login and password. There are even changes that you can make to protect an individual file if wanted. Help can be found at the Apache website.
prathapml Posted March 16, 2005 Posted March 16, 2005 Maybe he got the solution to that long ago.Anyways, having this in your .htaccess might do what you need?# //Preventing Directory Listing any filename of the specified extension IndexIgnore *.gif *.jpg
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now