Skip to content

Instantly share code, notes, and snippets.

@hissy
Created April 22, 2013 10:24
Show Gist options
  • Save hissy/5433792 to your computer and use it in GitHub Desktop.
Save hissy/5433792 to your computer and use it in GitHub Desktop.
ホワイトリストIPアドレス以外からのconcrete5の管理画面へのアクセスを拒否(ベータ) Deny user access to concrete5 dashboard when not match IP whitelist (BETA)
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !123\.4\.56\.789
RewriteCond %{REMOTE_ADDR} !123\.123\.123\.123
RewriteRule ^(dashboard|index.php/dashboard)(.*) - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --
@katzueno
Copy link

ねえねえねえ。6行目
RewriteRule ^(dashboard|index.php/dashboard|login|index.php/login)(.*) - [F]
でもいい?

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