Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
Is there a way to get back-end and front-end url of Umbraco Site? Example:
I have an Umbraco back-end url:
http://localhost:62195/umbraco/
I have an Umbraco front-end url:
http://localhost:62195/
So how can I use C# or javascript to get the default url of Back-end and Front-end of Umbraco Site when it run on other host like:
http://newdomain.com, http://newhost.com
Just put /umbraco in your domain for backend eg. http://newdomain/umbraco
You mean something like this?
var url = document.location.href; var arr = url.split("/"); var newUrl = arr[0] + "//" + arr[2] + "/umbraco/"; alert(newUrl);
Test it at: https://jsfiddle.net/ywg93aor/
It takes the address in the browser, removes everything after the third / (because: http:// already has 2 times a / in it) and adds /umbraco/ at the end.
/
http://
/umbraco/
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to get url of back-end and front-end from Umbraco Site?
Hello,
Is there a way to get back-end and front-end url of Umbraco Site? Example:
I have an Umbraco back-end url:
I have an Umbraco front-end url:
So how can I use C# or javascript to get the default url of Back-end and Front-end of Umbraco Site when it run on other host like:
Just put /umbraco in your domain for backend eg. http://newdomain/umbraco
You mean something like this?
Test it at: https://jsfiddle.net/ywg93aor/
It takes the address in the browser, removes everything after the third
/
(because:http://
already has 2 times a/
in it) and adds/umbraco/
at the end.is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.