有谁知道如何在雪豹中激活 URL 段支持?我认为我必须将 AcceptPathInfo On 指令添加到 /private/etc/apache2 中的 httpd.config 文件中,但我找不到正确的方法。我应该设置 AllowOverride 并改为 .htaccess 吗?任何建议将不胜感激,谢谢!
问问题
658 次
1 回答
1
您可以在服务器配置、虚拟主机、目录或 .htaccess上下文中使用该AcceptPathInfo
指令。
虚拟主机上下文:
这是虚拟主机localhost的示例:
<VirtualHost *:80> ServerName localhost DocumentRoot "/Users/username/Sites/localhost/" AcceptPathInfo on </VirtualHost>
这现在将适用于整个虚拟主机。
目录上下文:
如果您只想在特定目录中使用它,您可以
<Directory>
在服务器/虚拟主机配置文件中使用一个块:<Directory /Users/username/Sites/localhost/foobar> AcceptPathInfo on </Directory>
.htaccess上下文
或者,如果您想
AcceptPathInfo
在 .htaccess 文件中允许该指令,您需要为该目录设置,例如AllowOverride
FileInfo
<Directory /Users/username/Sites/localhost/foobar> AllowOverride FileInfo </Directory> # .htaccess file in /Users/username/Sites/localhost/foobar AcceptPathInfo on
于 2009-09-22T16:13:22.657 回答