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

后端 未结 8 1466
清歌不尽
清歌不尽 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:37

    You need to be able to see invisible files first.

    In finder press ++. –command + shift + dot– to toggle hidden files visibility.

    Then just go to the folder where the file is and you'll see it there. You can now rename the file to start with a . if you want.

    To create a new file you can do this in the terminal: touch .htaccess, once the terminal is at the right folder

提交回复
热议问题