.htaccess 文件选项 - 子目录上的索引 [英] .htaccess File Options -Indexes on Subdirectories

查看:37
本文介绍了.htaccess 文件选项 - 子目录上的索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下 .htaccess 行,很简单,root 上没有索引.

I have the following .htaccess line, simple no indexes on root.

Options -Indexes

我们要添加什么才能传播到任何子目录,而不必为每个子目录创建一个文件?一个 .htaccess 只在 root 上.

What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on root only.

推荐答案

正确答案是

Options -Indexes

你一定在想

AllowOverride All

https://httpd.apache.org/docs/2.2/howto/htaccess.html

.htaccess 文件(或分布式配置文件")提供了一种方法在每个目录的基础上进行配置更改.一份文件,包含一个或多个配置指令,放在一个特定的文档目录,指令适用于该目录目录及其所有子目录.

.htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

这篇关于.htaccess 文件选项 - 子目录上的索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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