admin管理员组文章数量:1122846
I have a local WordPress install running through MAMP. It's local domain is example.dev
I also have the install working with xip.io. It's at example.dev.0.0.0.0.xip.io
(0's being my ip address).
Right now the only way I seem to be able to get xip.io working is to add
define('WP_HOME', '');
define('WP_SITEURL', '');
to my wp-config.php
file.
This forces anyone going to example.dev
to go to example.dev.0.0.0.0.xip.io
The issue is at the office, my computer has a static IP address. At home, it does not.
So if I am in the office and go to example.dev.0.0.0.0.xip.io
in my local browser or in a browser on the network, it all works fine.
But if I am at home, example.dev
redirects to example.dev.0.0.0.0.xip.io
which does not work because my IP is no longer static.
So I need to be able to view the site locally at example.dev
and on a LAN connected computer at example.dev.0.0.0.0.xip.io
thus eliminating the static IP issue when I'm at home.
Any help would be appreciated!
I have a local WordPress install running through MAMP. It's local domain is example.dev
I also have the install working with xip.io. It's at example.dev.0.0.0.0.xip.io
(0's being my ip address).
Right now the only way I seem to be able to get xip.io working is to add
define('WP_HOME', 'http://example.dev.0.0.0.0.xip.io');
define('WP_SITEURL', 'http://example.dev.0.0.0.0.xip.io');
to my wp-config.php
file.
This forces anyone going to example.dev
to go to example.dev.0.0.0.0.xip.io
The issue is at the office, my computer has a static IP address. At home, it does not.
So if I am in the office and go to example.dev.0.0.0.0.xip.io
in my local browser or in a browser on the network, it all works fine.
But if I am at home, example.dev
redirects to example.dev.0.0.0.0.xip.io
which does not work because my IP is no longer static.
So I need to be able to view the site locally at example.dev
and on a LAN connected computer at example.dev.0.0.0.0.xip.io
thus eliminating the static IP issue when I'm at home.
Any help would be appreciated!
Share Improve this question edited Oct 23, 2017 at 19:33 Nick Taylor asked Oct 17, 2017 at 16:42 Nick TaylorNick Taylor 1379 bronze badges1 Answer
Reset to default 0Could this be resolved by a hosts
file entry that always routed relevant host requests back to local host?
本文标签: urlsHow to properly setup MAMP and XIP
版权声明:本文标题:urls - How to properly setup MAMP and XIP 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736292052a1928852.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论