Skip to content

Instantly share code, notes, and snippets.

@112KA
Created January 22, 2019 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 112KA/9ab33d8774ddae2f48ca3dab05e1e629 to your computer and use it in GitHub Desktop.
Save 112KA/9ab33d8774ddae2f48ca3dab05e1e629 to your computer and use it in GitHub Desktop.
.htaccess note
# mod_rewrite有効化
# httpd.confにて既に有効化済
#LoadModule rewrite_module modules/mod_rewrite.so
# Basic Authorization
AuthType Basic
AuthUserFile "/var/www/.htpasswd"
AuthGroupFile /dev/null
AuthName "Basic Auth. Enter ID and password."
Require valid-user
#デバッグ用
Satisfy any
Order deny,allow
##### 素通りIP設定 #####
#京都
Allow from xxx.xxx.xxx.xxx
#天王洲
Allow from xxx.xxx.xxx.xxx
#### /素通りIP設定 #####
Deny from all
#独,露は英にリダイレクト
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/de/ [OR]
RewriteCond %{REQUEST_URI} ^/ru/
RewriteRule ^(.*)$ https://%{HTTP_HOST}/en/ [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment