Mac OS X doesn't allow to name files starting with a dot. How do I name the .htaccess file?

后端 未结 8 1528
清歌不尽
清歌不尽 2021-01-30 03:44

As mentioned in the title, Mac OS X doesn\'t allow me to name files starting with a dot ( . ). But, I need an .htaccess file. Or, better, how do I use an htaccess file in Mac OS

8条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-30 04:31

    This works so far as it goes. But TextEdit automatically added .txt to the end of the filename so I ended up with .htaccess.txt

    And files with names starting with . don't show up in folders in Finder. You only see it if you go back into Terminal and use ls -a. And if it can't be seen then it can't be uploaded to an online webserver.

    Using Fetch as my FTP client, I found it has a function which enables me to create a simple text file directly on the server. This worked to create .htaccess where I really needed it.

提交回复
热议问题