MAMP 本地主机重定向
我在本地网络上的 MAMP 中开发站点,因此我决定设置端口转发以打开我的外部网络并允许 HTTP 流量直接发送到我的本地主机。
一切工作正常,我可以使用我的静态 IP 访问我的 MAMP 文件夹,但是,
我所有的 WordPress 安装都使用 http://localhost
作为前缀,并且 images/css/js 在以下情况下不起作用访问本地网络之外的站点。
无论如何,我可以告诉 MAMP 将所有本地主机流量重定向到我的静态 IP 吗?我正在修改 vhosts 文件但无济于事。
任何帮助将不胜感激
I develop sites in MAMP on my local network so I've decided to setup port-forwarding to open up my external network and allow HTTP traffic to go directly to my localhost.
Everything is working fine and I can access my MAMP folder using my static IP but,
All my WordPress installs are using http://localhost
as the prefix and the images/css/js aren't working when accessing the site outside the local network.
Is there anyway I can tell MAMP to redirect ALL localhost traffic to my static IP? I was modifying the vhosts file but to no avail.
Any help would be greatly appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这不是对您问题的直接答案,但我遇到了同样的问题,并且已成功使用此插件将站点从本地主机迁移到生产域。 http://wordpress.org/extend/plugins/search-and-replace/。
注意:我从未遇到过任何问题,但请先备份您的数据库。安全总比后悔好。
I know this isn't a direct answer to your question, but I've had the same issue and have successfully used this plugin to migrate sites from localhost to the production domain. http://wordpress.org/extend/plugins/search-and-replace/.
Note: I've never had any issues, but please backup your db first. Better safe than sorry.