同时使用Local主机和自定义域访问我的本地网站

发布于 2025-02-12 10:46:53 字数 832 浏览 0 评论 0原文

我有一个本地WordPress网站,上面有自定义域mySite.local.local,但是我无法将此自定义域用作带有Google API的重定向URI。唯一接受的方法是使用localhost

我想保持自定义域的运行,并将任何流量重定向到localhost到此自定义域,因此所有流量都可以mySite.local.locallocal -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:

enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文