.htaccess files on ubuntu 8.10

vampist

Fully Optimized
Messages
2,404
Location
USA
My .htaccess files seem to be disappearing...

They still work for example one .htaccess denies all from a folder. I go in that folder and the .htaccess is gone just after making it and leaving that folder.

Yet if I try and access that folder using the browser it returns a 404 error.
So they seem to be sort of working although I think it's suppose to return a 403 isn't it?

Anyone know why they are disappearing?


Just got an idea.. I'm going to make a .htaccess file in a folder then leave the folder, then re enter see if the file is still there. Nope it's gone.

Lets see what happens when I enter that URL in the browser. Again acts like the .htaccess is still there.
Catch this I tried to make a .htaccess file in the folder where the other .htaccess vanished and it says that file name .htaccess is already in use.
 
how are you viewing the folder listing.

.htaccess is a hidden file so youo can only see it when using the ls command to list files with a switch to show hidden files.
 
Is command?
Sorry I'm new to Linux.
I'm just browsing through the folders with 'open folder'.
I do have sudo/root access while browsing.

What do I have to do to be able to see them?
 
Open a terminal, and go to the folder where the file SHOULD be (for example, /var/www)

Type in:

Code:
cat .htaccess
If you get the contents of the .htaccess file, the "dotfiles" are being hidden.

If you get the error:
Code:
cat: .htaccess: No such file or directory
Then the file is, for some reason being deleted/not being written in the first place.
 
Ok so I tried the cat command threw back the error.
So I type cd then the location of the file then cat command.
Didn't give me an error but it didn't make the file shown.

So I did some searching to see if there was a "Show hidden files" button or option somewhere.

Found it of course under view. The .htaccess file was hidden not only to the client but the server user as well.. Sorta of an interesting feature but alight.
(New to Ubuntu)

Thanks for the help guys. :D
 
Back
Top Bottom