Skip to content

Instantly share code, notes, and snippets.

@joergpatz
Last active August 29, 2015 14:00
Show Gist options
  • Save joergpatz/1dd302f48d94d4ef288f to your computer and use it in GitHub Desktop.
Save joergpatz/1dd302f48d94d4ef288f to your computer and use it in GitHub Desktop.
Apache mod_rewrite
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^(192\.168\.56\.1|192\.168\.56\.2)$
RewriteCond %{REQUEST_URI} (/login.*|/node.*|/welcome.*) [NC]
RewriteRule ^(.*)$ index.php [F,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} =sub.domain.de
RewriteRule ^/$ /login [L,R=301]
@joergpatz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment