get the base uri part before the options as they can be non URI valid such as the expression using $ chars
and the URI constructor will regard $ as an illegal character and we dont want to enforce end users to
to escape the $ for the expression (file language)