asked    Edgar     2018-10-12       iis       29 view        1 Answer

[SOLVED] How to point www.example.com/umbraco to admin.example.com

I have requirement to point www.example.com/umbraco to admin.example.com in iis.When user access to admin.example.com it should load umbraco backoffice. Thanks in advance

  1 Answer  

        answered    Horace     2018-10-12      

I guess the main goal is to protect Umbraco admin area. You can do that with rewrite rules. I presume that your website in IIS already has two bindings: www.example.com and admin.example.com. Add this rules into your web.config:

<rules>
    <rule name="redirect to umbraco" stopProcessing="true">
        <match url="^$" />
        <conditions>
            <add input="{HTTP_HOST}" pattern="^admin.example.com$" />
        </conditions>
        <action type="Redirect" url="umbraco" />
    </rule>
    <rule name="close umbraco from public" stopProcessing="true">
        <match url="^umbraco(.*)" />
        <conditions>
            <add input="{HTTP_HOST}" pattern="^admin.example.com$" negate="true" />
        </conditions>
        <action type="CustomResponse" statusCode="403" statusReason="Forbidden" />
    </rule>
    <rule name="redirect non umbraco to public" stopProcessing="true">
        <match url="^umbraco(.*)" negate="true" />
        <conditions>
            <add input="{HTTP_HOST}" pattern="^admin.example.com$" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        </conditions>
        <action type="Redirect" url="http://www.example.com{REQUEST_URI}" />
    </rule>
</rules>

This rules will:

1) Redirect from admin.example.com to admin.example.com/umbraco

2) Close /umbraco* urls if you will try to access it from www.example.com domain.

3) Redirect all urls other than /umbraco* from domain admin.example.com to www.example.com





Your Answer





 2018-10-12         Norton

Umbraco: Document Type Chain by Composition

Can I use Composition in Umbraco 7.5 to make a property inheritance chain, like BaseType > ContentPage > HomePage, in which ContentPage has its own properties and inherit all properties from BaseType, and HomePage has its own properties and inherit all properties form ContentPage explicitly, and of course from BaseType implicitly? For some reason, I can make ContentPage to have a composition of type BaseType, but then for HomePage, Umbraco doesn't display ContentPage as an option. I thought the new Composition feature has replaced document type hierarchies (defining documen...
 c#                     1 answers                     9 view
 2018-10-12         Kristin

Umbraco Carousel Content

I am putting together my first Umbraco project and starting to pick it up nicely. I am a little stuck at creating an appropriate repeatable field for a Carousel with text, image and a link but also how to output that in a template.I come from a Craft CMS / Expression Engine background and would usually use a repeatable field like Matrix or Grid for such a task.Any help would be fantastic!Thanks!-Graham Check Nested Content package (it will be included in Umbraco Core soon): https://our.umbraco.org/projects/backoffice-extensions/nested-content/ and then create appropriate...
 content-management-system                     1 answers                     10 view
 2018-10-12         Jason

Umbraco 7: custom dropdown dynamically populated from Items in a specific node

I have a "Language" document type, and under my site's Content I have a folder called "Languages" which contains all the languages we support.I created a custom Data Type called "Languages Dropdown", and I want this dropdown to be populated from the instances of "Language" present at a specific path.This is my default Sitecore thinking in action. Is such a thing even possible in Umbraco? Certainly - first of all, take a look at nuPickers and see if that can do what you want - 99% of the time this sort of thing can be handled really easily with that package:https://our.um...
 content-management-system                     1 answers                     11 view