htaccess Maintenance Redirect with IP and folder omission

/ Published in: Perl
Save to your folder(s)

Redirects to specified page ignoring specified ip address and folders.

Copy this code and paste it in your HTML
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteCond %{REMOTE_ADDR} !^00\.000\.00\.000
  4. RewriteCond %{REQUEST_URI} !^/index\.html$
  5. RewriteCond %{REQUEST_URI} !^/path/to/(.*)$
  6. RewriteCond %{REQUEST_URI} !^/path/to/(.*)$
  7. RewriteRule ^(.*)$ [R=307,L]

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.