Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/02/2012, 08:48
albertrc
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
trabajar con varios nombres de dominio

tendria que hacer 3 nuevos virtualhost ?

vi /etc/hosts
127.0.0.1 localhost
127.0.0.1 seophp.example.com
127.0.0.1 www.example.com
127.0.0.1 www.example.org
127.0.0.1 www.example.net

/etc/httpd/conf/httpd.conf
Código Apache:
Ver original
  1. <VirtualHost 127.0.0.1:80>
  2.         DocumentRoot /var/www/html
  3.         ServerName localhost
  4. </VirtualHost>
  5.  
  6. <VirtualHost 127.0.0.1:80>
  7.         DocumentRoot /var/www/html/seophp
  8.         ServerName seophp.example.com
  9.         <Directory /var/www/html/seophp>
  10.                 Options Indexes FollowSymLinks
  11.                 AllowOverride All
  12.                 Order allow,deny
  13.                 Allow from all
  14.         </Directory>
  15. </VirtualHost>

tengo el siguiente fichero .htaccess en /var/www/html/seophp
Código Apache:
Ver original
  1. RewriteEngine On
  2. RewriteCond %{HTTP_HOST}  !^www\.example\.com
  3. RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

http://www.example.org?query=string tendria que redireccionar a
http://www.example.com?query=string

no hace la redirrecion i añade /
http://www.example.org/?query=string

que es lo que no hago bien, alguien puede ayudarme, soy bastante nuevo en este tema y estoy perdido