Skip to content

Instantly share code, notes, and snippets.

@MrTrick
Created January 14, 2013 04:59
Show Gist options
  • Save MrTrick/4527857 to your computer and use it in GitHub Desktop.
Save MrTrick/4527857 to your computer and use it in GitHub Desktop.
Non-functional rewrite rules. Seems to fail the condition on line 6?
# If external, don't allow them to log in (won't be able to connect anyway)
# (Derived from the data in the 'relay filters' page)
RewriteLog /tmp/rewrite_testing
RewriteLogLevel 4
RewriteCond %{REQUEST_URI} ^/authentication/login$ [NC]
RewriteCond %{REMOTE_ADDR} !^192\.168\.[45]\d\.
RewriteCond %{REMOTE_ADDR} !^192\.168\.(71|76|176|86)\.
RewriteCond %{REMOTE_ADDR} !^192\.168\.(8|9|11|12|13|14|68|20)\.
RewriteRule ^/(.*) https://example.com/usethevpninstead [R]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment