在使用 Umbraco 生成的页面链接内指定了域
不确定标题解释了我想要做什么,所以这里是:我有一个使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议使用 UrlAbsolutifierModule ( http://www.paraesthesia.com/archive/2007/12/14/urlabsolutifiermodule---convert-urls-in-asp.net-output-to-absolute.aspx)或类似的。
I suggest using UrlAbsolutifierModule ( http://www.paraesthesia.com/archive/2007/12/14/urlabsolutifiermodule---convert-urls-in-asp.net-output-to-absolute.aspx ) or similar.
我终于通过使用 解决了这个问题重写IIS的规则,入站+出站。
我也尝试过 NiceUrlFullPath 但它不起作用。
I finally solved this by using Rewrite rules for IIS, Inbound + Outbound.
I also tried with NiceUrlFullPath but it did not work.