gpt4 book ai didi

php - Slim Framework .htaccess/mountain lion osx

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:36:12 34 4
gpt4 key购买 nike

我有一个问题让我有些头疼,我希望这里有人可以分享一些线索。

我之前运行的是 OS X Mountain Lion,使用 slim 框架完全没有问题。自从升级到 OS X Mountain Lion 后,我遇到了很多麻烦,因为它会重写您的 httpd.conf 和其他设置。其中之一似乎是 htaccess。我有 vhosts 设置,一些以前使用 slim 工作的东西现在在 / 以外的任何 url 上都坏了。

所以我的 htaccess 文件自升级后没有改变,所以我想知道问题出在哪里。我使用的是 slim 框架下载中提供的默认 htaccess,我什至尝试了自定义的 htaccess,但无济于事。

访问 / 会生成所需的页面。访问不同的 URL 会这样做:

Not Found

The requested URL /myurl was not found on this server.

有人有什么建议吗?


mod_rewrite 已启用,这就是我的 vhost 设置:

<Directory "/Users/chris/Sites/slimphp/">
Allow From All
AllowOverride All
</Directory>
<VirtualHost *:80>
ServerName "slim.php"
DocumentRoot "/Users/chris/Sites/slimphp"
</VirtualHost>

最佳答案

经过广泛研究后,我发现是 Apple 的 server.app 改变了很多东西。这个博客对我来说是一个救星。

http://petercompernolle.com/2012/07/26/fixing-httpdconf-in-osx-mountainlion

And then several hours later, I figured it out. It's no longer stored at /etc/apache2/httpd.conf. For some reason, Apple has changed something that's worked for a long time, and instead created a whole bunch of files in /Library/Server/Web/Config/apache2/sites. There's a .conf file for anything on port 80, another .conf file for the site I created in Server.app, and a whole bunch of other backups made for every change I made in Server.app.

关于php - Slim Framework .htaccess/mountain lion osx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11931971/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com