5
votes

I am trying to change the default admin UI URL used in Umbraco to a custom URL. The default URL is simply /umbraco, for example:

http://mywebsite.com/umbraco

As an example, I would like the admin UI URL to be:

http://mywebsite.com/asdf

So far, I have tried changing the umbracoPath app setting in the Web.Config:

<add key="umbracoPath" value="~/asdf" />

And renaming the 'Umbraco' folder to 'asdf' in my Visual Studio solution.

This gives some success, when navigating to /asdf:

Attempt at changing URL

However, the default admin UI page is blank. If I navigate to /asdf#/umbraco, then the expected default page is loaded:

Attempt at changing URL 2

I have obviously missed something, but cannot find what/where - how do I change the default admin UI URL to /asdf?

2

2 Answers

6
votes

From the official Umbraco documentation you can do this one of two ways.

Firstly:

Add this rule to your "/config/urlrewriting.config" file

<add name="adminrewrite" 
    virtualUrl="^~/asdf/"       
    rewriteUrlParameter="ExcludeFromClientQueryString"
    destinationUrl="~/umbraco/umbraco.aspx"
    ignoreCase="true" />

Secondly

Rename 'Umbraco' directory to 'asdf' then change your web.config file as below:

<add key="umbracoReservedPaths" value="~/asdf,~/install" />
<add key="umbracoPath" value="~/asdf" />

The second option is what you have already tried but I think it may be the reserved paths part that you are missing.

Just a word of warning, this has been rather a big issue since about version 4 and from the looks of things on the official community forums, this is still something that works for some people and doesn't work for others.

5
votes

I've found that renaming the Umbraco folder can have some adverse side effects. For example, if you use any packages developed by a third party some of them may have hard coded paths that require the Umbraco folder. If you can, a simple solution is to just create a 'asdf' virtual directory on the server and point it at the Umbraco folder. The Web.config and /Config/UrlRewriting.config changes are still necessary. I generally add to the reserved paths instead of replacing the umbraco item:

<add key="umbracoReservedPaths" value="~/asdf,~/umbraco,~/install" />