外部链接的固定链接

发布于 2024-09-15 20:43:21 字数 172 浏览 4 评论 0原文

我想在我的网站上使用永久链接作为外部链接。例如,如果我的网站上有此链接:google.com,它应该重写为[并向读者显示]:

mysite.com/go/google

这可能吗?关于如何在 .htaccess 中执行此操作有什么想法吗?

I would like to use permalink for external links on my site. For example, if I have this link on my site: google.com, it should rewrite to [and show the reader]:

mysite.com/go/google

Is this possible? Any ideas on how to go about doing this in .htaccess?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

得不到的就毁灭 2024-09-22 20:43:21

您无法重写外部网址。重写不会查看您的 html 代码,它会查看发送到 Apache 的请求,并根据您的重写规则提取内容。

You can't rewrite external urls. Rewriting doesn't look at your html code, it looks at the request sent to Apache, and pulls content based on your rewrite rule.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文