htaccess git管理から除外
Showing
3 changed files
with
82 additions
and
82 deletions
.htaccess
deleted
100644 → 0
1 | # AddHandler x-httpd-php5619 .php | ||
2 | |||
3 | |||
4 | Options +SymLinksIfOwnerMatch | ||
5 | |||
6 | Options -Indexes | ||
7 | |||
8 | RewriteEngine on | ||
9 | |||
10 | |||
11 | ## Begin - Rewrite rules to block out some common exploits. | ||
12 | # If you experience problems on your site then comment out the operations listed | ||
13 | # below by adding a # to the beginning of the line. | ||
14 | # This attempts to block the most common type of exploit `attempts` on Joomla! | ||
15 | # | ||
16 | # Block any script trying to base64_encode data within the URL. | ||
17 | RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] | ||
18 | # Block any script that includes a <script> tag in URL. | ||
19 | RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] | ||
20 | # Block any script trying to set a PHP GLOBALS variable via URL. | ||
21 | RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] | ||
22 | # Block any script trying to modify a _REQUEST variable via URL. | ||
23 | RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) | ||
24 | # Return 403 Forbidden header and show the content of the root home page | ||
25 | RewriteRule .* index.php [F] | ||
26 | # | ||
27 | ## End - Rewrite rules to block out some common exploits. | ||
28 | |||
29 | ## Begin - Custom redirects | ||
30 | # | ||
31 | # If you need to redirect some pages, or set a canonical non-www to | ||
32 | # www redirect (or vice versa), place that code here. Ensure those | ||
33 | # redirects use the correct RewriteRule syntax and the [R=301,L] flags. | ||
34 | # | ||
35 | ## End - Custom redirects | ||
36 | |||
37 | ## | ||
38 | # Uncomment the following line if your webserver's URL | ||
39 | # is not directly related to physical file paths. | ||
40 | # Update Your Joomla! Directory (just / for root). | ||
41 | ## | ||
42 | |||
43 | # RewriteBase / | ||
44 | |||
45 | ## Begin - Joomla! core SEF Section. | ||
46 | # | ||
47 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | ||
48 | # | ||
49 | # If the requested path and file is not /index.php and the request | ||
50 | # has not already been internally rewritten to the index.php script | ||
51 | RewriteCond %{REQUEST_URI} !^/index\.php | ||
52 | # and the requested path and file doesn't directly match a physical file | ||
53 | RewriteCond %{REQUEST_FILENAME} !-f | ||
54 | # and the requested path and file doesn't directly match a physical folder | ||
55 | RewriteCond %{REQUEST_FILENAME} !-d | ||
56 | # internally rewrite the request to the index.php script | ||
57 | RewriteRule .* index.php [L] | ||
58 | # | ||
59 | ## End - Joomla! core SEF Section. | ||
60 | |||
61 | |||
62 | RewriteEngine On | ||
63 | # RewriteCond %{HTTPS} off | ||
64 | # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | ||
65 | |||
66 | #20200122 - IPアクセスリダイレクトnozaki | ||
67 | RewriteBase / | ||
68 | RewriteCond %{HTTP_HOST} ^18\.178\.92\.128$ [NC] | ||
69 | RewriteRule .* https://www.nifs-k.ac.jp%{REQUEST_URI} [R=302,L] | ||
70 | |||
71 | # 20200809 gitignore アクセス禁止 | ||
72 | RedirectMatch 404 /\.git | ||
73 | |||
74 | <IfModule mod_siteguard.c> | ||
75 | SiteGuard_User_ExcludeSig ip(202.95.45.168) | ||
76 | SiteGuard_User_ExcludeSig ip(202.24.160.0/21) | ||
77 | SiteGuard_User_ExcludeSig ip(210.137.6.192/26) | ||
78 | SiteGuard_User_ExcludeSig ip(210.237.39.72) | ||
79 | SiteGuard_User_ExcludeSig ip(210.237.36.185) | ||
80 | SiteGuard_User_ExcludeSig ip(18.178.92.128) | ||
81 | </IfModule> |
1 | # AddHandler x-httpd-php5619 .php | ||
2 | |||
3 | |||
4 | Options +SymLinksIfOwnerMatch | ||
5 | |||
6 | Options -Indexes | ||
7 | |||
8 | RewriteEngine on | ||
9 | |||
10 | |||
11 | ## Begin - Rewrite rules to block out some common exploits. | ||
12 | # If you experience problems on your site then comment out the operations listed | ||
13 | # below by adding a # to the beginning of the line. | ||
14 | # This attempts to block the most common type of exploit `attempts` on Joomla! | ||
15 | # | ||
16 | # Block any script trying to base64_encode data within the URL. | ||
17 | RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] | ||
18 | # Block any script that includes a <script> tag in URL. | ||
19 | RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] | ||
20 | # Block any script trying to set a PHP GLOBALS variable via URL. | ||
21 | RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] | ||
22 | # Block any script trying to modify a _REQUEST variable via URL. | ||
23 | RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) | ||
24 | # Return 403 Forbidden header and show the content of the root home page | ||
25 | RewriteRule .* index.php [F] | ||
26 | # | ||
27 | ## End - Rewrite rules to block out some common exploits. | ||
28 | |||
29 | ## Begin - Custom redirects | ||
30 | # | ||
31 | # If you need to redirect some pages, or set a canonical non-www to | ||
32 | # www redirect (or vice versa), place that code here. Ensure those | ||
33 | # redirects use the correct RewriteRule syntax and the [R=301,L] flags. | ||
34 | # | ||
35 | ## End - Custom redirects | ||
36 | |||
37 | ## | ||
38 | # Uncomment the following line if your webserver's URL | ||
39 | # is not directly related to physical file paths. | ||
40 | # Update Your Joomla! Directory (just / for root). | ||
41 | ## | ||
42 | |||
43 | # RewriteBase / | ||
44 | |||
45 | ## Begin - Joomla! core SEF Section. | ||
46 | # | ||
47 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | ||
48 | # | ||
49 | # If the requested path and file is not /index.php and the request | ||
50 | # has not already been internally rewritten to the index.php script | ||
51 | RewriteCond %{REQUEST_URI} !^/index\.php | ||
52 | # and the requested path and file doesn't directly match a physical file | ||
53 | RewriteCond %{REQUEST_FILENAME} !-f | ||
54 | # and the requested path and file doesn't directly match a physical folder | ||
55 | RewriteCond %{REQUEST_FILENAME} !-d | ||
56 | # internally rewrite the request to the index.php script | ||
57 | RewriteRule .* index.php [L] | ||
58 | # | ||
59 | ## End - Joomla! core SEF Section. | ||
60 | |||
61 | |||
62 | RewriteEngine On | ||
63 | # RewriteCond %{HTTPS} off | ||
64 | # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | ||
65 | |||
66 | #20200122 - IPアクセスリダイレクトnozaki | ||
67 | RewriteBase / | ||
68 | RewriteCond %{HTTP_HOST} ^18\.178\.92\.128$ [NC] | ||
69 | RewriteRule .* https://www.nifs-k.ac.jp%{REQUEST_URI} [R=302,L] | ||
70 | |||
71 | # 20200809 gitignore アクセス禁止 | ||
72 | RedirectMatch 404 /\.git | ||
73 | |||
74 | <IfModule mod_siteguard.c> | ||
75 | SiteGuard_User_ExcludeSig ip(202.95.45.168) | ||
76 | SiteGuard_User_ExcludeSig ip(202.24.160.0/21) | ||
77 | SiteGuard_User_ExcludeSig ip(210.137.6.192/26) | ||
78 | SiteGuard_User_ExcludeSig ip(210.237.39.72) | ||
79 | SiteGuard_User_ExcludeSig ip(210.237.36.185) | ||
80 | SiteGuard_User_ExcludeSig ip(18.178.92.128) | ||
81 | </IfModule> | ... | ... |
-
Please register or sign in to post a comment