Mac OS X不允许命名以点开头的文件。如何命名.htaccess文件? [英] Mac OS X doesn't allow to name files starting with a dot. How do I name the .htaccess file?

查看:413
本文介绍了Mac OS X不允许命名以点开头的文件。如何命名.htaccess文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题中所述,Mac OS X不允许我以点(。)开头的文件命名。
但是,我需要一个.htaccess文件。或者,更好的是,如何在Mac OS X中使用htaccess文件而不给它起一个点号呢?

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 X without giving it a name starting with a dot?

我正在运行Mac OS 10.5.8和< a href = http://en.wikipedia.org/wiki/XAMPP rel = noreferrer> XAMPP 1.7.3。

I am running Mac OS 10.5.8 and XAMPP 1.7.3.

推荐答案

您无法使用Finder执行此操作。打开 Terminal.app Applications-> Utilities->终端),然后输入:

You can't do this with the Finder. Open Terminal.app (Applications -> Utilities -> Terminal), and type:

> cd /path/to/directory/containing/htaccess
> mv current_file_name .htaccess

示例(当然,不要直接使用目录名或初始文件名):

Example (do not take directory names or initial filename literally, of course):

这篇关于Mac OS X不允许命名以点开头的文件。如何命名.htaccess文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆