URL redirection in IIS

-1

I'm having problems with redirection here in the company, it's the following:

I have a IIS server where I have the current company website and within this site I have webservices running by using a ???.com.br domain on port 80.

My question is that I hired a company to create a new website and my company's website will stay in a subdomain of this company that I hired and I would like it when someone types www.???.com.br (my domain) to be redirected to the subdomain of a company that I hired to develop the new site, bigger problem is that when typing my domain the user will have to come in my IIS and then be redirected, because I can not redirect my domain to the subdomain of the company that made the new site because I have my webservices running on the same domain www.???.com.br

Can anyone give me a light on how to solve this problem? A little confusing explanation, but I think I understand.

    
asked by anonymous 01.10.2015 / 16:42

1 answer

0

There are many ways to redirect to another page, regardless of whether they are in the same domain.

1) If your domain points to an HTML page, for example, you can include the meta tag below within head :

<meta http-equiv="refresh" content="0;http://subdominio.dominio.com.br">

It is probably the best method as it is simple and works even if the client browser is disabled.

2) You can redirect using Javascript:

<script language=javascript>
    function redirect(){
        window.location.href = "http://subdominio.dominio.com.br";
    }
</script>

<body onload="redirect()">
    <!-- Qualquer conteúdo no body não será exibido, uma vez que a página será redirecionada -->
</body>

3) If the page is ASP you can use:

<% Response.Redirect ("http://subdominio.dominio.com.br") %>

4) If the page is PHP you can use:

<?php header('location: http://subdominio.dominio.com.br');

In other ways.

    
01.10.2015 / 19:14