h1

Cómo albergar varios dominios en una misma cuenta de hosting

19/11/2013

Si se desea tener diversos dominios en una misma cuenta de hosting, es necesario a parte de tener configuradas las DNS adecuadamente, tener en la raíz del hosting si utiliza Apache la siguiente configuración en el fichero «.htaccess» 

 

 # .htaccess main domain to subdirectory redirect
        # Copy and paste the following code into the .htaccess file
        # in the public_html folder of your hosting account
        # make the changes to the file according to the instructions.
        # Do not change this line.
        RewriteEngine on

# INICIO DOMINIO1 # Change example.com to be your main domain. RewriteCond %{HTTP_HOST} ^(www.)?example.com$ # Change 'subdirectory' to be the directory you will use for your main domain. RewriteCond %{REQUEST_URI} !^/subdirectory/ # Don't change these line. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Change 'subdirectory' to be the directory you will use for your main domain. RewriteRule ^(.*)$ /subdirectory/$1 # Change example.com to be your main domain again. # Change 'subdirectory' to be the directory you will use for your main domain # followed by / then the main file for your site, index.php, index.html, etc. RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteRule ^(/)?$ subdirectory/index.html [L]
#FIN DOMINIO 1
#INICIO DOMINIO 2
(...)

Reemplazando «example.com» por el dominio en cuestión y «subdirectory» por el subdirectorio que lo albergará. Repetir el bloque de directivas por cada dominio.

 

Fuente: https://my.hostmonster.com/cgi/help/347

Deja una respuesta

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Salir /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Salir /  Cambiar )

Conectando a %s

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.

A %d blogueros les gusta esto: