Redirect to specific folder as soon as user accesses domain

0

Whenever the user accesses the site www.teste.com.br, I want it to be redirected to the / new folder. Example: www.teste.com.br/novo Can you do this in .php or through .htaccess?

    
asked by anonymous 01.08.2017 / 14:21

1 answer

1

just use php's native function header () example:

header('Location: www.site.com/novocaminho');

Or if you prefer use .htaccess, you get into the root directory example:

Redirect 301 / http://site.com/novocaminho 
#tambem podes meter arquivos php
    
01.08.2017 / 14:30