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

238
Vistas
Redirect different pages based on IPs, too many connections

I need redirect all traffic to apache website except some IP to courtesy page, I tried to put these lines at the bottom of .htaccess

RewriteCond %{REMOTE_ADDR} !^1.2.3.4
RewriteRule .* /coming-soon.html [R=301,NC]

With my IP 1.2.3.4 the website works, other IP instead have too many redirect but into address bar appear https://www.example.com/coming-soon.html , where am i wrong?

Thanks

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

0

Isn't the message itself crystal clear? You implemented an endless redirection loop. The URL /coming-soon.html will again get redirected by your rule, since the IP address has not changed. You need a second condition to prevent that:

RewriteCond %{REMOTE_ADDR} !^1.2.3.4
RewriteCond %{REQUEST_URI} !^/coming-soon\.html$
RewriteRule .* /coming-soon.html [R=301,NC]

This is a variant with a few additional changes that probably do make sense:

RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4$
RewriteCond %{REQUEST_URI} !^/coming-soon\.html$
RewriteRule ^ /coming-soon.html [R=301,L]
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