File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 11RewriteEngine On
22
3+ # Hide files and folders starting with a dot
4+ RewriteRule (^|/)\.(.*)$ - [F]
5+
36# If the requested URL is a directory
47RewriteCond %{REQUEST_FILENAME} -d
58
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments