How to tackle url/href/css/js when in virtual directory?
I ran into a problem where I needed to deploy Sitefinity website in a virtual directory. I came to know that my stylesheet/js links doesnt work with following:
<link href="/Common/CSS/Default_en_gb.css" rel="stylesheet" type="text/css" />
I cant use <%= BaseUrl %> to manage the urls when as a independent website or in virtual directory.
Have you tried using ResolveUrl()?
Something like this should work:
In addition to the previous suggestions you can try to put the path to css or .js file in the browser and see if they are accessible. If you are forbidden to view them check if you have proper permissions on the folders where css and .js files reside.
the Telerik team
Thanks SelAromDotNet for the suggestion!
I went deep into the control that Sitefinity offers and tried that way. I used ResourceLinks control to have my stylesheets referenced to my masterpages correctly.
Then I added resources on runtime as needed (for English and Arabic):
Thanks very much for the guidance guys.