Orchard 1.3 and absolute urls

Topics: Core, General, Writing modules
Jan 29, 2012 at 10:58 AM

Is it possible to override some class of orchard to make sure it's returning absolute url's instead of the relative urls'?

I want to do this because i have dynamic subdomains for user profiles (http://orchard.codeplex.com/discussions/253884) but i don't want to use the subdomains to show up when the visitor is visiting other pages then user profiles.

Jan 29, 2012 at 1:53 PM

ok i found out you can just use just things like overloads of the Url.RouteUrl so that you can specify the host.

Jan 30, 2012 at 4:28 PM

Could you link me to more information about that? It's something I'm going to need to do but I haven't looked into yet.

Jan 31, 2012 at 8:35 AM

I've used the following overload of the routeUrl method:

http://msdn.microsoft.com/en-us/library/dd460200.aspx

Jan 31, 2012 at 1:17 PM
Edited Jan 31, 2012 at 1:18 PM

Oh I see. I was hoping there was some way to override MVC's Url rendering so you can make sure absolute Urls always got written out for certain routes. (I mean, without actually having to change the templates where the routes are generating...)