Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

322
Visualizações
Apache ErrorDocument is not working When there is another Redirect rule

Here is my httpd.conf

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} localhost
RewriteRule (.*) https://google.com [R=301,C]
RewriteCond %{REMOTE_ADDR} !^192\.168\.134\.129
RewriteCond %{REMOTE_ADDR} !^192\.168\.1\.8
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,C]
ErrorDocument 503 /maintenance.html
Header Set Cache-Control "max-age=0, no-store"
</IfModule>

First what im doing: a middleware server which in normal mode will redirect everything to main server (google.com for now) and will show a maintenance page, when in maintenance mode.

ErrorPage is working fine if i delete

RewriteCond %{HTTP_HOST} localhost
RewriteRule (.*) https://google.com [R=301,C]

so paths and everything should be ok

log gives me this Request exceeded the limit of 10 internal redirects due to probable configuration error.

I've tryed to use LimitInternalRecursion, but it didnt make any difference.

This is my first experience with web-servers, so i dont know what my problem is, please tell if there is an error somewhere in my rules, or if im doing everything wrong, thx.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda