Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee Kelleher 4024 posts 15833 karma points MVP 13x admin c-trib
    Jan 13, 2010 @ 22:22
    Lee Kelleher
    0

    Issues with using Umbraco in Sub-folder / Virtual Directory?

    Hi all,

    I already know that Umbraco doesn't support virtual directories - but does anyone know what happens if you do - or at least try to?

    Reason I ask is that I am redeveloping an existing website for a client - and the prerequisite is that the base URL doesn't change, which is in this format:

    http://www.domain.com/section/website/

    (Obviously, I've not used the real domain/folder names - doh!)

    Now, they want to use Umbraco (and why not), but I'm trying to figure out how to best handle this.

    So far, my thinking is that I will do the following:

    1. Install Umbraco on a separate domain - so the backend is accessible via something like: http://www.domain2.com/umbraco/umbraco.aspx
    2. Set the hostname of the the root content (homepage) node to "www.domain.com/section/website"
    3. Set "useDomainPrefixes" (in umbracoSettings.config) to true
    4. In IIS, point the "/section/website/" to the Umbraco install

    The thinking behind this is that when you go to "www.domain.com/section/website" - you will get the content pages, and NiceUrl will resolve the links with full URL (I need to double-check that though).

     

    So in a nutshell, I want the front-end to run from a sub-folder / virtual-directory ... and the back-office can be accessed from a root domain (or sub-domain, whatever).

    Can anyone see any fatal flaws in this idea?

    Many thanks, Lee. 

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 13, 2010 @ 22:38
    Aaron Powell
    1

    A lot of the Umbraco internals (particularly Data Types IIRC) do stuff like this: "../bin/" + AssemblyName + ".dll". I think there's also some "/bin" stuff somewhere.

    It is currently being looked into though, Per is working on supporting virtual directories (check out codeplex check ins).

  • Lee Kelleher 4024 posts 15833 karma points MVP 13x admin c-trib
    Jan 13, 2010 @ 23:00
    Lee Kelleher
    0

    Thanks Aaron, I thought as much.  Really looking forward to v4.1!

    In the meantime, we've got ISAPI_Rewrite at our disposal... along with a lot of jiggery-pokery, I'm sure we'll figure out a workable solution!

    Cheers, Lee.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 13, 2010 @ 23:12
    Aaron Powell
    0

    Yeah Per's goal is to get it into 4.1, as it'll also help with Mono support, which would be totally awesome :D

  • Lee Kelleher 4024 posts 15833 karma points MVP 13x admin c-trib
    Jan 13, 2010 @ 23:17
    Lee Kelleher
    0

    Hella yeah! Along with Benjamin's Medium Trust patches, the playing field for Umbraco has exploded!

    Exciting times ahead for Umbraco devs!

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 13, 2010 @ 23:27
    Aaron Powell
    1

    Next up, iPhone version :P

  • vijay 129 posts 152 karma points
    Jan 14, 2010 @ 14:43
    vijay
    0

    Please give some more details

    vijay

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jan 14, 2010 @ 16:38
    Jamie Howarth
    1

    There's already a module that produces iPhone-compatible pages... here.

    @Lee Thankyou :-) DM me on Twitter so I can grab that App_Code editor from you at some stage as well, cause that's a must-have on my radar.

  • Lee Kelleher 4024 posts 15833 karma points MVP 13x admin c-trib
    Jan 14, 2010 @ 17:31
    Lee Kelleher
    0

    @Benjamin - sure I'll send you the App_Code editor code ... DM me your email address.

    Going back to the original topic ... I'm getting pretty desperate on finding a solution.

     

    Is there anyway I can have the front-end on a sub-folder ... and for the back-end - I don't care where it is ... domain/sub-domain, it's all good. The key part is the front-end URL (sub-folder).

    Thanks, Lee.

  • Lee Kelleher 4024 posts 15833 karma points MVP 13x admin c-trib
    Jan 14, 2010 @ 18:24
    Lee Kelleher
    0

    Thoughts so far ...

    1. Static version of the site.  On the publish event, create a static version of the page and copy it to the sub-folder. Maybe using/extending Darren Ferguson's old Export to HTML plugin - or develop code to hook into the WinHTTrack command line?

    2. Write a small proxy app - that handles the URLs from the sub-folder ... calling Umbraco /base (or other web-service methods) - and replace the root URL with the sub-folder (for all the hyperlinks/scripts/images/etc).

    3. ISAPI_Rewrite / htaccess ... we do have a license for this - and have tried to use the RewriteProxy - but ran into all sorts of problems with /WebResource.axd, etc.

    4. ... [insert crazy hairbrained scheme here!]

    Am I completely off track here, missing something completely obvious?  Any feedback all at is appreciated!

    Thanks, Lee.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 14, 2010 @ 19:12
    Douglas Robar
    1

    I know, I know, you said... "the prerequisite is that the base URL doesn't change, which is in this format: http://www.domain.com/section/website/"

    But what does it mean to say the urls have to work? Do you mean you could 301 redirect all the old urls to new urls without the /section/website/ portion of the url? All old links people had bookmarked, were embedded in the pages, or saved in search engines would continue to work just fine... but you wouldn't need to handle the nearly incompatible url format with umbraco.

    A serious 301 redirect mechanism (rewriting urls; not-found handler; or other) would be the best of all worlds, I think.

     

    Another option would be load umbraco into the root of the site and create a 'section' and 'website' node in the content tree, below which all your content exists. Umbraco would handle the urls flawlessly. If you needed to allow other appliations to work in the domain (say, /section2 or /section/website2) you could add those to the reserved urls and reserved path sections of the web.config file.

     

    What do you think? Either of these workable?

    cheers,
    doug.

  • Lee Kelleher 4024 posts 15833 karma points MVP 13x admin c-trib
    Jan 14, 2010 @ 20:42
    Lee Kelleher
    0

    Thanks for your ideas Doug, very much appreciated.

    Due to my NDA/contract, I can't explain the importance of the root domain (that the sub-folder sits under), but let's say it's a pretty big brand - and I can't make any changes to it.

    We are now talking about moving the site to it's own domain ... which would resolve this issue completely! Then we'll do as you suggested with the 302 redirects. (IMO, this is the most sensible solution).

    Thanks again!

    Cheers, Lee.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 22, 2010 @ 18:23
    Chris Houston
    0

    Hi All,

    Can anyone let me know if Virtual Directory support is now available?

    I also have a client who would like to run multiple sub sites under virtual directories, rather than having sub-domains.

    E.g.:

    http://www.domain.com/firstsite

    http://www.domain.com/secondsite

    Cheers,

    Chris

  • Lee Kelleher 4024 posts 15833 karma points MVP 13x admin c-trib
    Nov 23, 2010 @ 10:54
    Lee Kelleher
    0

    Hi Chris,

    When v4.5 was released, I did test it out on a Virtual Directory - and it worked great - for my testing purposes.  I haven't actually used it on a live/production website yet. (The website in my original post went with a sub-domain option).

    My concern about using Virtual Directories is package support - as I know a lot make an assumption about being in the web-root ... but I guess until someone starts using Virtual Directories, we'll never know!

    Cheers, Lee.

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Nov 23, 2010 @ 14:13
    Tom Fulton
    0

    I've installed 4.5.2 in a virtual directory for a very small site.  I did run into one (fairly) major issue, there is a bug that prevents users from adding images in the RTE.  See http://umbraco.codeplex.com/workitem/29196 

    Other than that, everything seemed to work fine, but again it was a very small site

  • happytech 4 posts 25 karma points
    May 16, 2014 @ 09:36
    happytech
    0

    Hi!

    Has there been any new developments on this?

    Has support for running umbraco in a subfolder or virtual directory been implemented?

    I have got two umbraco 6 installations that I need to move from

    www.domain1.com and www.domain2.com  

    to www.newdomain.com/domain1 and www.newdomain.com/domain2

    Kindly,

    Trond

  • AvihayBit 149 posts 303 karma points
    May 25, 2014 @ 08:20
    AvihayBit
    0

    Hi,

     

    It would be usefull for me two if any anyone know on a progress with using umbraco on a subfolder.

    I'm trying to host 3 umbraco installation under 1 domain. One on the main folder and 2 on 2 subfolder.

    The goal is to save the need of 3 ssls, dedicated IP and so...

     

    Anyone?

  • happytech 4 posts 25 karma points
    May 26, 2014 @ 09:37
    happytech
    1

    Hi,

    For me, the answer was here:

    http://our.umbraco.org/documentation/Installation/install-umbraco-manually

    "Using a virtual directory"

     

     

  • AvihayBit 149 posts 303 karma points
    May 27, 2014 @ 18:04
    AvihayBit
    0

    Hey thanks! It did the trick for me too!

    But now It seems that every relative link points to the root. Is ther any option to change the root of the umbraco installation so it root will be the virtual directory?

     

  • happytech 4 posts 25 karma points
    May 28, 2014 @ 08:35
    happytech
    0

    You can have a look at the section "ResolveUrlsFromTextString" in http://our.umbraco.org/documentation/Using-Umbraco/Config-files/umbracoSettings/ ;

    However, to make it work for my existing content, I did a search and replace for the links int the media library in the database. I also attempted to do this for the documents, but it only seemed to work for some of the links. The rest of them, I corrected manually. 

    Hope this helps.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft