.htaccess for maintenance redirecting loop

Discussion in 'Apache' started by creative4w3, Mar 30, 2011.

  1. #1
    Hi everyone. The following code is used in .htaccess to only let certain IPs to the site for when it's under maintenance. I'm getting some kind of a redirecting loop error though. Can't seem to figure out what the problem is.

    The bottom is a rewrite rule for ExpressionEngine.

    RewriteEngine On
    RewriteCond %{REMOTE_ADDR} !^98\.165\.141\.199$
    RewriteRule $ /splash.php [R=302,L]
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]

    Ty in advance.
     
    creative4w3, Mar 30, 2011 IP