Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

210
Vistas
RewriteCond excluding domain

I'm struggling with my RewriteCond in .htaccess

I have to redirect 301 all my domains (domain1.com ; domain2.com ; domain3.com) to a single domain (x1x1x1.com) except 1 (domain4.com)

Do I have to use RewriteCond to exclude domain4.com or can I exclude it immediately in the RewriteRule ?

I've tried:

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{HTTP_HOST} ^domain4\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.domain4\.com [NC]

RewriteRule ^(.*)$ https://x1x1x1.com/ [R=301,L]

</IfModule>

Thx all

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

something like this...

<IfModule mod_rewrite.c>

RewriteEngine On 
RewriteCond %{HTTP_HOST} !domain4.com [NC]
RewriteRule ^ https://x1x1x1.com/

</IfModule>
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda