Redirigir home con htaccess a una carpeta:
Muchas veces es aconsejable colocar nuestro contenido principal en una subcarpeta tipo /portal, /pt, /tienda, /shop, /blog, etc.
De esta forma si algún día queremos instalar otro script o redirigir el tráfico a otra carpeta, resulta más fácil.
En este caso queremos por ejemplo redirigir www.tudominio.com a www.tudominio.com/blog
Método 1) Utilizando .htaccess (recomendable)
Inserta el siguiente código en el archivo .htaccess del root.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^tudominio.com$
RewriteRule (.*) http://www.tudominio.com/$1 [R=301,L]
RewriteRule ^$ blog [L]
Si quieres una redirección externa, pon el flag R:
RewriteRule ^$ /blog [L,R=301]
Método 2) Utilizando index.html:
<!DOCTYPE HTML PUBLIC «-//W3C//DTD HTML 4.01 Transitional//EN»
«http://www.w3.org/TR/html4/loose.dtd»>
<html>
<head>
<title>TUDOMINIO.COM</title>
<meta http-equiv=»expires» content=»0″>
<meta http-equiv=»Cache-Control» content=»no-cache»>
<meta name=»description» CONTENT=»»>
<meta name=»keywords» CONTENT=»»>
<meta name=»distribution» CONTENT=»global»>
<META NAME=»resource-type» CONTENT=»document»>
<meta name=»robots» CONTENT=»all»>
<meta name=»REVISIT-AFTER» CONTENT=»7 days»>
<meta http-equiv=»Content-Type» content=»text/html; charset=iso-8859-1″>
<style type=»text/css»>
<!–
.Estilo1 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
–>
</style>
<meta HTTP-EQUIV=»Refresh» content=»0; URL=http://www.tudominio.com/blog»>
</head>
<body>
</body>
</html>