0
votes

I have this MVC4 web application, I run it locally at mySite.local/. I created an application in IIS 7, mapping to mySite.local/corporateSite/. I point that application to an Umbraco (CMS) installation I have locally.

This works pretty well.

I have these UI images and .css files that were in my corporate site and were linked-to by absolute urls (Examples: /css/myCss.css, /media/ui/myFunLogo.png, etc.).

Now this "/" root has changed, if I want my css and images to work, I have to use /corporateSite/cssmyCss.css... this is logical.

How can I change my configuration or sites setup or code so that I don't have to write that whenever I'm linking to a file like that. Should I use rewrite rules to prepend the application url?

How to people integrate these elements normally ? I know a lot go through subdomains, but this would not be ideal for us at the moment.

Thanks for the help!

(I think my question is related to this one how to integrate umbraco with mvc4 but in some different aspects. And the answers are not good for me.)

1

1 Answers

1
votes

In umbracoSettings.config, there is a setting for "ResolveUrlsFromTextString".

Setting it to true should tell Umbraco to add the virtual directory name to links and images.