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.