This project is read-only.

Get absolute url?

Topics: Customizing Orchard, Writing themes
Aug 8, 2011 at 5:35 PM

I need to produce an absolute URL to a blog post. I can get the path, but am not sure the best way to get the host. Is there something Orchard-specific, or should I just use standard ASP.NET methods with Request.?

I ask if there's something Orchard-specific because I want to use the canonical path to an item. Specifically, if the user is on www, I want that removed.


Aug 8, 2011 at 8:32 PM

There is a base URL setting that you could use but anything that works in ASP.NET should also work here.