同时使用Local主机和自定义域访问我的本地网站
我有一个本地WordPress网站,上面有自定义域mySite.local.local
,但是我无法将此自定义域用作带有Google API的重定向URI。唯一接受的方法是使用localhost
。
我想保持自定义域的运行,并将任何流量重定向到localhost
到此自定义域,因此所有流量都可以mySite.local.local
和local -Host
将击中我的本地站点(在NGINX上运行)。
这是我尝试使用mysite.local
作为Google API控制台中的重定向URI时得到的:
请参阅接受localhost
被接受,否则,它要求使用有效的顶级私人域。
我试图找到一种使用.htaccess
或/etc/hosts
而没有运气的方法。
I have a local WordPress site with the custom domain mysite.local
, but I can't use this custom domain as a Redirect URI with Google APIs. The only accepted way is to use localhost
instead.
I want to keep the custom domain running, and redirect any traffic to localhost
to this custom domain, so all the traffic to mysite.local
and localhost
will hit my local site (running on Nginx).
Here's what I get when I try to use mysite.local
as a redirection URI in Google API console:
See that the localhost
was accepted, otherwise, it asks to use a valid top private domain.
I tried to find a way to do that with .htaccess
or /etc/hosts
with no luck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论