要么所有选项都必须以 + 或 - 开头,要么没有选项可以

d00*_*001 12 .htaccess apache-2.2

我在 .htaccess 文件中有这一行

Options +SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI  Includes  IncludesNOEXEC  SymLinksIfOwnerMatch  Indexes -Indexes
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Either all Options must start with + or -, or no Option may.
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题并仍然做同样的事情?

更好的是这条线有什么作用,甚至需要它吗?

Fal*_*mot 22

您的问题的答案包含在错误消息中。

在这种情况下,正确的做法是打骂写那行的人,并列出指定的每个选项。如果它以减号出现,请用减号将其放入一次。如果它看起来只是裸露的或带有加号,则将其放入一次加号。

我相信你只是想要这个:

Options +SymLinksIfOwnerMatch +ExecCGI +Includes +IncludesNOEXEC -Indexes
Run Code Online (Sandbox Code Playgroud)

我不知道为什么该区域需要此特定选项集。但是,请随时阅读文档以获取对每个文档的解释,并查看您的用例如何或是否需要它。