在使用 Umbraco 生成的页面链接内指定了域

发布于 2024-09-25 08:48:58 字数 760 浏览 0 评论 0原文

不确定标题解释了我想要做什么,所以这里是:我有一个使用 Umbraco 4.5.x 构建的网站,页面中的链接使用相对路径。我想将域名添加到这些链接前面,但不知道该怎么做;我并没有真正使用过 Umbraco,所以我是一个新手:(。

我想做的是

<a href="/about-us/who-we-are.aspx">Who we are...</a>

将以下链接替换为:

<a href="http://www.our-domain.com/about-us/who-we-are.aspx">Who we are...</a>

<a href="www.our-domain.com/about-us/who-we-are.aspx">Who we are...</a>

我必须为此做哪些事情? 是所有 Umbraco 配置还是做我需要编写一些代码吗?或者

我发现了一些关于 useDomainPrefixes 配置,但它似乎不起作用(不确定它是否与我想做的事情相关)。

谢谢!

Not sure the title explains what I want to do, so here goes: I have a website constructed with Umbraco 4.5.x and the links in the pages use relative paths. I want to have the domain prepended to these links and don't know how to do that; I didn't really used Umbraco so I am a newby at this :(.

What I want to do is replace links like:

<a href="/about-us/who-we-are.aspx">Who we are...</a>

with something like:

<a href="http://www.our-domain.com/about-us/who-we-are.aspx">Who we are...</a>

or

<a href="www.our-domain.com/about-us/who-we-are.aspx">Who we are...</a>

What are the things that I must do for this? Is it all Umbraco configuration or do I need to write some code? Or both?

I found something about the useDomainPrefixes config but it does not seem to work (not sure if it is even related to what I want to do).

Thank you!

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

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

发布评论

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

评论(2

铜锣湾横着走 2024-10-02 08:48:58

我终于通过使用 解决了这个问题重写IIS的规则,入站+出站。

我也尝试过 NiceUrlFullPath 但它不起作用。

I finally solved this by using Rewrite rules for IIS, Inbound + Outbound.

I also tried with NiceUrlFullPath but it did not work.

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