Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!