SitePoint Sponsor

User Tag List

Results 1 to 23 of 23
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Viewing htaccess files in Mac Lion' Finder

    Just switched to Mac from Windows and when I go into Finder I can't see my htaccess files and can't find a way to change that. Anyone have a trick to do that so they show up?

  2. #2
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hold off on this, I think it is another issue caused when they were moved from one machine to another and some of them may not have copied.

  3. #3
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    5,316
    Mentioned
    213 Post(s)
    Tagged
    5 Thread(s)
    This may help. I don't use a Mac, but on Linux, filenames that start with a dot are hidden by default. Pressing Ctrl+H toggles the hide/show. According to that article, Mac is similar, although toggling appears to be more difficult.

  4. #4
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    8,891
    Mentioned
    138 Post(s)
    Tagged
    2 Thread(s)
    ^ yes, mac hides files that start with a dot as well.
    Rémon - Hosting Advisor

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  5. #5
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, after doing some experimentation that is the case. The files are hidden. The Command H does not toggle the files, it appears to close some windows and toggle some others.

    So how do people working on a Mac handle editing .htaccess files?

    Most of what I have seen toggles all files on or off using the terminal window and I really don't want to do that every time I have an edit.

    Thanks

  6. #6
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm thinking at this point that I will just maintain them as .txt files on the mac and then rename them when I publish them. Unless someone has a better way of course.

  7. #7
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    I use my editor (Coda, TextMate, etc.) to open hidden files. That works in most editors, not all.

    The ideal way is to use your terminal, however. If you plan on doing lots of local development, knowing your way around the terminal will save you lots of time and headaches.

    The more convenient solution might be using a software like the Desktop Utility (free, scroll down that page): http://sweetpproductions.com/
    Maleika E. A. | Rockatee | Twitter | Dribbble



  8. #8
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    5,316
    Mentioned
    213 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by bostboy View Post
    I'm thinking at this point that I will just maintain them as .txt files on the mac and then rename them when I publish them. Unless someone has a better way of course.
    Just knocking the dot off the front works on Linux.

  9. #9
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,604
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    Using WinDoze, I use EditPad Lite (a text editor) which allows me to open/save any file name/extension I like. I use it exclusively for my .htaccess and *.conf files as well as the (extensionless) hosts file.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  10. #10
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but I am using a Mac and Editpad is Windows based. On Windows I prefer Notepad++, wish I could get it on the Mac.

  11. #11
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Which editor are you using on the Mac currently?
    Maleika E. A. | Rockatee | Twitter | Dribbble



  12. #12
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Komodo and it seems to work fine except it doesn't allow for hidden files. And to clarify, I use Dreamweaver as a page text editor and content manager, without any of the automated functions and that seems to work fine for me.

    But I like to have a second editor that I use for different things including htaccess files for local, web test and web production environments; css files; and other documentation files that I like to keep up and viewable.

    In Windows I was using Dreamweaver and Notepad++ and it worked great. So I'm not married to Komodo either. If there is a simple context sensitive text editor that is free and does the hidden files, I'm willing to take a look.

    And I'm not averse to using the terminal, but for day to day repetitive tasks, i would rather not have to dive any further into that right now. I currently use it for MySQL data dumps and transfers.

  13. #13
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    If it needs to be a free app, then TextWrangler would be the best option. The opening of hidden files is a standard feature in this app.

    If you don't mind a commercial app, then I'd have a look at Panic's Coda and TextMate. Both have free trial versions.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  14. #14
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    You can try in your terminal (Applications > Utilities) type the following:

    Code:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    This will now show you all of the hidden files and folders on your operating system. If you want to reverse the command replace TRUE with FALSE. You can then use any application you want to open and edit the .htaccess files providing you have the right permissions to do so.

    Regards,
    Steve
    ictus==""

  15. #15
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Steve, I have seen this but don't want to do this every time I want to open and edit a file and don't want to leave all the system files visible.

    And thanks Kahoutek, I will take a look at TextWrangler. And I don't have anything against a commercial app but for what I am doing with it, just seems there should be a decent free app out there.

  16. #16
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,604
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    bost,

    I use Dreamweaver (when I'm too lazy to open EditPad) and it knows how to deal with .htaccess files.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  17. #17
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I downloaded TextWrangler and can't find any way to open or view hidden files. The help file specifically states that files beginning with a '.' are hidden on Mac OS.

  18. #18
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,590
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    It's easy to show all hidden files on the Mac. Just go to Finder > View > Show System Files.

    I don't have TextWrangler, but there is usually an option under View > similar to the above.

  19. #19
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dklynn, thanks, and yes that's true. Just a preference of mine to keep them out of the primary editor. I use the secondary editor to hold files that I leave open all the time as reference files and also for some various text editing or manipulation. It's not that big a deal just to put a .txt on the end of the htaccess and rename them when I ftp them up.

    Again, thanks all.

  20. #20
    SitePoint Evangelist
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not on my Mac. I go to Finder>View and there is no Show System Files or any other place to show hidden files. You using Lion?

  21. #21
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,590
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Yes, I'm on Lion. That's bizarre that you don't see the same options.

    Here's what I see:

    finder.jpg

  22. #22
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Ralph, that feature doesn't show in my Lion by default either.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  23. #23
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,590
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Hm, yeah, it must be caused by a Finder add-on I'm using, called TotalFinder. It's very nice, actually: creates Finder tabs that can be linked together, making it easy to drag items from one folder to another etc. Anyhow, that must be creating the option for me. Sorry for the red herring.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •