# Relative URLs, or setting the root URL

**URL:** <https://www.finalbuilder.com/forums/t/relative-urls-or-setting-the-root-url/5425>\
**Category:** Discussion\
**Created:** [October 14, 2015, 1:13am UTC](https://www.finalbuilder.com/forums/t/relative-urls-or-setting-the-root-url/5425 "2015-10-14T01:13:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeroenp](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/c89c15/32.png) [@jeroenp](https://www.finalbuilder.com/forums/u/jeroenp)\
**Post date:** [October 14, 2015, 1:13am UTC](https://www.finalbuilder.com/forums/t/relative-urls-or-setting-the-root-url/5425/1 "2015-10-14T01:13:01Z")

</div>

I’ve an https certificate on my openSuSE front-end server.  
  
There I’m redirecting [https://www.pluimers.com/continuaci](https://www.pluimers.com/continuaci) to the internal server ([http://192.168.71.46:8080](http://192.168.71.46:8080))  
  
But this fails as ContinuaCI emits all URLs in the responses as absolute URLs. This happens right from the start, as&nbsp;[http://192.168.71.46:8080](http://192.168.71.46:8080) to&nbsp;[http://192.168.71.46:8080](http://192.168.71.46:8080)/account/login?ReturnUrl=%2f which then becomes&nbsp;[https://www.pluimers.com/](https://www.pluimers.com/)account/login?ReturnUrl=%2f and is not availble.  
  
This is the situation described in&nbsp;[http://serverfault.com/questions/561892/how-to-handle-relative-urls-correctly-with-a-reverse-proxy](http://serverfault.com/questions/561892/how-to-handle-relative-urls-correctly-with-a-reverse-proxy)  
  
The easiest two ways to solve this would be to:  
  
1- be able to set the root URL of the Continua CI server  
2- be able to configure Continua CI only to emit relative URLs (preferred)  
  
Other solutions (like URL rewriting) are convoluted and therefore really not preferred.  
  
How can I do 1? If not: can 2 be put on the back-log?

---

<div class="post-metadata">

**Author:** ![jeroenp](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/c89c15/32.png) [@jeroenp](https://www.finalbuilder.com/forums/u/jeroenp)\
**Post date:** [October 14, 2015, 6:17am UTC](https://www.finalbuilder.com/forums/t/relative-urls-or-setting-the-root-url/5425/2 "2015-10-14T06:17:37Z")

</div>

I’ve worked around this, but it was quite a bit of work to get [https://continuaci.pluimers.com](https://continuaci.pluimers.com) going:   
  
 - request a new StartSSL Class 1 certificate for the subdomain [continuaci.pluimers.com](http://continuaci.pluimers.com)   
 - create new vhosts content for HTTPS and HTTP   
 - configure new virtual hosts for the HTTPS and HTTP in Apache   
 - mess with the apache configuration so httpd2 pre-check would succeed (that’s an issue in OpenSuSE I still need to research and report)   
 - fiddler with ProxyPass configuration so it would work   
  
 It works (:   
 Which I need for [https://github.com/jpluimers/Conferences/tree/master/2015/20151020-DAPUG-Denmark-Nyborg-Hotel-Hesselet](https://github.com/jpluimers/Conferences/tree/master/2015/20151020-DAPUG-Denmark-Nyborg-Hotel-Hesselet)

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [October 14, 2015, 11:52am UTC](https://www.finalbuilder.com/forums/t/relative-urls-or-setting-the-root-url/5425/3 "2015-10-14T11:52:39Z")

</div>

Hi Jeroen   
  
 I’ve been looking at what urls Continua CI produce, and the only absolute urls I’m seeing are external links (like to the help or our website). Continua CI is uses [asp.net](http://asp.net) mvc (v4 currently), and we got to great lengths to make sure all emitted urls are relative. Are you able to point to where these absolute urls are?

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [October 15, 2015, 12:02pm UTC](https://www.finalbuilder.com/forums/t/relative-urls-or-setting-the-root-url/5425/4 "2015-10-15T12:02:23Z")

</div>

Ok, I think I understand what the issue is… the generated urls do not have ~ at the start, not sure if there is a way to make [asp.net](http://asp.net) mvc generate urls that way or not. We’ll investigate, but I would imagine it would be a huge job to review the entire app for this. From my googling, the general consensis is to use subdomains, so you are on the right path imho.

---

<div class="post-metadata">

**Author:** ![jeroenp](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/c89c15/32.png) [@jeroenp](https://www.finalbuilder.com/forums/u/jeroenp)\
**Post date:** [October 15, 2015, 8:43am UTC](https://www.finalbuilder.com/forums/t/relative-urls-or-setting-the-root-url/5425/5 "2015-10-15T08:43:48Z")

</div>

> Posted By [Vincent Parrett](https://www.finalbuilder.com/user-profile/userid/5) on 14 Oct 2015 05:02 PM  
> Ok, I think I understand what the issue is.. the generated urls do not have ~ at the start, not sure if there is a way to make asp.net mvc generate urls that way or not. We'll investigate, but I would imagine it would be a huge job to review the entire app for this. From my googling, the general consensis is to use subdomains, so you are on the right path imho.

  
  
I think you nailed it with the ~ so please put that on the back log with low priority.  
  
I've a setup where I can test with both a subdomain&nbsp;[https://continuaci.pluimers.com](https://continuaci.pluimers.com/) and a normal domain&nbsp;[https://www.pluimers.com/continuaci](https://www.pluimers.com/continuaci)  
So reviewing can be done.  
  
--jeroen
