Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

z400central

macrumors regular
Original poster
Nov 8, 2006
118
0
Hi Guys,

I need to edit a .htaccess file for my website, but I can't see the files in Leopard. What's up with that? And how can I fix it?

Something so simple....Weird! :confused:

Thanks!
 
Yes. That's true. The .htaccess file is hidden because it starts with a dot and Mac OS X hides files with a dot. You can use a utility like xMod to show hidden files and edit the file.

Hello Math, looks like you may know a bit more than I do. I live in Denver too, damn cold :p glad the snow stopped.

Well, so how do you see .htaccess file on mac? I use CyberDuck as my FTP client, and even CyberDuck is not able to see .htaccess file on my server. I used xMod.app and checked see hidden files, but no go...

Any other suggestions?
 
I used to use Cyber Duck but it stopped working after one of the updates so I switched to Fetch--and it does not hide dot files.
 
Hello Math, looks like you may know a bit more than I do. I live in Denver too, damn cold :p glad the snow stopped.

Well, so how do you see .htaccess file on mac? I use CyberDuck as my FTP client, and even CyberDuck is not able to see .htaccess file on my server. I used xMod.app and checked see hidden files, but no go...

Any other suggestions?

Apparently it's a glitch in Cyberduck having to do with some servers not displaying hidden files when using the STAT command. A workaround is to open Terminal and enter:
Code:
defaults write ch.sudo.cyberduck ftp.sendStatListCommand false
Worked for me.
 
Damn frustrating..
I also tried from Terminal and reached my dir and did
rm .htaccess

But no good.

It didnt even show the .htaccess when I did ls for that directory.

Dman, another MAC limitation.
 
You'll need to use something like "ls -a" to show hidden files. It's not a Mac limitation per se; Unix hides files beginning with a dot.
 
Hi Guys,

I need to edit a .htaccess file for my website, but I can't see the files in Leopard. What's up with that? And how can I fix it?

Something so simple....Weird! :confused:

Thanks!

All Unix systems, not just Mac OS X by default don't show files that start with a dot. It's been that

way the at least 30 years.

It you are using the terminal and want to list files use the -a switch. Remember "a" is for "all". So "ls -a" will show you all the files.

This is the reason for the dot in htaccess so it will not be listed in directory listings by the browser.

You can always simply type in the filename
 
I use cyberduck. In the file browser window towards the top right there is a search field. Type "." in there and your .htaccess file should pop up.

You can either edit it straight away or back it up on your mac. If you want to back it up you'll need to rename it with something before the dot. When you upload it again, change the name back to .htaccess after you've uploaded it to your webserver.

Hope that works for you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.