forked from EC-CUBE/ec-cube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
68 lines (57 loc) · 2.14 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
DirectoryIndex index.php index.html .ht
<FilesMatch "^composer|^COPYING|^\.env|^\.maintenance|^Procfile|^app\.json|^gulpfile\.js|^package\.json|^package-lock\.json|web\.config|^Dockerfile|^\.editorconfig|\.(ini|lock|dist|git|sh|bak|swp|env|twig|yml|yaml|dockerignore|sample)$">
order allow,deny
deny from all
</FilesMatch>
<Files ~ "index.php">
order deny,allow
allow from all
</Files>
<IfModule mod_headers.c>
# クリックジャッキング対策
Header always set X-Frame-Options SAMEORIGIN
# XSS対策
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options nosniff
</IfModule>
# デザインテンプレートを適用するため10Mで設定
<IfModule mod_php7.c>
php_value upload_max_filesize 10M
</IfModule>
<IfModule mod_rewrite.c>
#403 Forbidden対応方法
#ページアクセスできない時シンボリックリンクが有効になっていない可能性あります、
#オプションを追加してください
#Options +FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
# Authorization ヘッダが取得できない環境への対応
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
RewriteRule "^\.git" - [F]
RewriteRule "^src/" - [F]
RewriteRule "^app/" - [F]
RewriteRule "^tests/" - [F]
RewriteRule "^var/" - [F]
RewriteRule "^vendor/" - [F]
RewriteRule "^node_modules/" - [F]
RewriteRule "^gulp/" - [F]
RewriteRule "^codeception/" - [F]
RewriteRule "^bin/" - [F]
RewriteRule "^dockerbuild/" - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !^(.*)\.(gif|png|jpe?g|css|ico|js|svg|map)$ [NC]
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# 管理画面へのBasic認証サンプル
#
# AuthType Basic
# AuthName "Please enter username and password"
# AuthUserFile /path/to/.htpasswd
# AuthGroupFile /dev/null
# require valid-user
#
# SetEnvIf Request_URI "^/admin" admin_path # ^/adminは, 管理画面URLに応じて変更してください
# <RequireAll>
# Require all granted
# Require not env admin_path
# </RequireAll>