Created
January 22, 2019 04:36
-
-
Save 112KA/9ab33d8774ddae2f48ca3dab05e1e629 to your computer and use it in GitHub Desktop.
.htaccess note
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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