让 WordPress 永久链接在 MAMP 安装上运行
我已经在本地安装了 WordPress 的 MAMP,并且正在尝试让永久链接正常工作。但是,当我将永久链接设置设置为“日期和名称”后单击链接时 http://localhost/wordpress_1/2011/01/12/sample-post/
我得到 404ed
未找到:请求的 URL /wordpress_1/2011/01/05/hello-world/ 在此服务器上找不到。
这是 mod_rewrite 问题吗? mod_rewrite 列在我的 phpinfo 的“已加载模块”部分中。我需要做其他事情来启用它吗?
谢谢
更新:
来自我的httpd.conf:
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
I've got a local MAMP install of WordPress and am trying to get permalinks working. But when I click my links after setting permalink setting to 'Day and name' http://localhost/wordpress_1/2011/01/12/sample-post/
I get 404ed
Not Found: The requested URL
/wordpress_1/2011/01/05/hello-world/
was not found on this server.
Is this a mod_rewrite issue? mod_rewrite is listed in the 'loaded modules' section of my phpinfo. Do I need to do something else to enable it?
Thanks
UPDATE:
From my httpd.conf:
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将我的 httpd.conf 从 更改为
并且
它有效。
Changed my httpd.conf from
To
And it works.
需要在 MAMP 中打开跟随符号链接。
在 /Applications/MAMP/conf/apache/ 中打开 httpd.conf 文件
查找
<目录/>
确保您设置了以下选项:
您还可以设置本地虚拟主机,以便更好地测试您的 WordPress 网站。这超出了本问题/主题的范围,但如果您愿意,我可以创建一个示例配置文件以及有关如何执行此操作的说明。
Follow symlinks needs to be turned on in MAMP.
Open your httpd.conf file in /Applications/MAMP/conf/apache/
Look for
<Directory />
Make sure that you have the following Options set:
You can also setup a local virtual host for better testing of your WordPress site. It's beyond the scope of this question/topic, but if you'd like I can create an example config file and instructions on how to do that.