将根链接 [href="/foo.bar"] 重写为 [domain.com/~user/foo.bar]?

发布于 2024-12-24 20:39:16 字数 191 浏览 1 评论 0 原文

我托管的网站具有 www.domain.com/~user/ 根地址。根 HTML 链接(例如 href="/foo.bar")指向 www.domain.com/foo.bar 而不是 www.domain.com/~用户/foo.bar。有办法解决这个问题吗?

I am hosting a website that has a www.domain.com/~user/ root address. Root HTML links such as href="/foo.bar" point to www.domain.com/foo.bar instead of www.domain.com/~user/foo.bar. Is there a way to fix this?

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

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

发布评论

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

评论(1

半夏半凉 2024-12-31 20:39:16

添加到 HTML 文件的头部,然后删除 .htaccess 东西。

Add <base href="http://www.domain.com/~user/" /> to the head of your HTML files, and remove that .htaccess stuff.

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