我创建了一个只有以下线条的.httaccess文件:
选项 - Indexs
然而,仍然为目录显示索引。
我刚刚安装了Apache2, 并且正在使用所有的默认值( 我没有修改 apache2. conf 或 httpd. conf ) 。
OS: Ubuntu 12.04 (Precise Pangolin)
Apache2 version: Server version: Apache/2.2.22 (Ubuntu) Server built: Feb 13 2012 01:51:56
$ ls -l .htaccess
-rwxr-xr-x .htaccess
编辑:
我接受了Lanzz的建议,并在.htaccess
文件添加了胡言乱语,发现 .htaccess
文件没有读取。