Skip to content

Commit d1a215c

Browse files
authored
1.6.2
1 parent bb534cf commit d1a215c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.htaccess

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
RewriteEngine On
22

3+
# Hide files and folders starting with a dot
4+
RewriteRule (^|/)\.(.*)$ - [F]
5+
36
# If the requested URL is a directory
47
RewriteCond %{REQUEST_FILENAME} -d
58

nginx.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ location / {
1313
if (-f $request_filename/index.htm) {
1414
set $no_index 0;
1515
}
16+
if (-f $request_filename/index.cgi) {
17+
set $no_index 0;
18+
}
1619
if (-f $request_filename/index.shtml) {
1720
set $no_index 0;
1821
}
@@ -30,6 +33,13 @@ location / {
3033
rewrite ^(.*)$ /index.php?$query_string last;
3134
}
3235

36+
# Hide files and folders starting with a dot
37+
location ~ /\. {
38+
deny all;
39+
access_log off;
40+
log_not_found off;
41+
}
42+
3343
# Serve the requested file
3444
try_files $uri $uri/ =404;
3545
}

0 commit comments

Comments
 (0)