Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@katzueno
Forked from hissy/.htaccess
Last active January 30, 2018 00:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katzueno/4d99f3c97420e4f2325f to your computer and use it in GitHub Desktop.
Save katzueno/4d99f3c97420e4f2325f to your computer and use it in GitHub Desktop.
Whitelisting IP for concrete5 dashboard / IP アドレス制限
## -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Change RewriteBase path if this concrete5 is installed on subdirectory / concrete5 がサブディレクトリにインストールされていたら、RewriteBase の変更が必要です。
# IP address restriction starts here / IP アドレス制限、アクセス許可するのIPの設定
RewriteCond %{REMOTE_ADDR} !123\.4\.56\.789
RewriteCond %{REMOTE_ADDR} !123\.123\.123\.123
# Add more lines is you have more IP / もっとIPがある場合は、行を追加してください
RewriteRule ^(dashboard|index.php/dashboard|login|index.php/login)(.*) - [F]
# IP address restriction ends here / IPアドレス制限の設定ここまで
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment