1
I have a controller:
public class imoveisController : Controller
{
    public ActionResult Index(int idEstado = 0, int idCidade = 0, int[] idRegiao = null)
    {
        string IdEstado;
        string IdCidade;
        int[] IdRegiao;
        #LeOuGravaCookie
        #region MontaViewBags
        #region RetornaBairros
        #region RetornaImoveisDessesBairros
        return View(ImoveisRetornados);
    }
}
In the view there is a form where the user can select 1 state and 1 city and a set of neighborhoods. And when submitted it returns to the Index action that instead of reading this data a cookie will receive from the form, do the search and return the properties. Working 100% straight.
My problem is that when returning it displays to the user the following url:
meusite/immovable
And I need to return depending on what the user selects in the form If he informed only the state:
meusite/immobile/{stateInformable}
If he also selected a city:
meusite/imoveis/{stateInformado}/{Cidadeinformada}
Could someone help me do that?