File: //etc/nginx/conf.d/users/zekestreehouseco/zekestreehouse.com.ng/wp-toolkit.conf
# This file is automatically generated by WP Toolkit.
# Please do not modify the contents of this file, because this can lead to reduced security or malfunctioning of your website.
# If the file was accidentally modified or otherwise damaged, you can regenerate it by deleting it and reapplying all security
# measures for this site in WP Toolkit UI.
# "Block access to wp-config.php"
# To remove this rule, revert this security measure on each WordPress installation on this domain
location ~* wp-config.php { deny all; }
# "Block access to xmlrpc.php"
# To remove this rule, revert this security measure on each WordPress installation on this domain
location ~* xmlrpc.php { deny all; }
# "Disable PHP execution in cache directories"
# To remove this rule, revert this security measure on each WordPress installation on this domain
location ~* ".*/cache/.*\.ph(?:p[345]?|t|tml)" {
access_log off;
log_not_found off;
deny all;
}
# "Block access to sensitive files"
# To remove this rule, revert this security measure on each WordPress installation on this domain
location ~* "(?:wp-config\.bak|\.wp-config\.php\.swp|(?:readme|license|changelog|-config|-sample)\.(?:php|md|txt|htm|html))" {
return 403;
}
# WordPress permalink
# To remove this rule, add "wordpressPermalinkHandlingFeature = false" in the [ext-wp-toolkit] section of panel.ini
# then reconfigure the current domain
set $sef_entry_point /;
if ($uri ~* "^/") {
set $sef_entry_point "/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_8/") {
set $sef_entry_point "/.wp-toolkit_8/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_c/") {
set $sef_entry_point "/.wp-toolkit_c/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_q/") {
set $sef_entry_point "/.wp-toolkit_q/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_u/") {
set $sef_entry_point "/.wp-toolkit_u/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_f/") {
set $sef_entry_point "/.wp-toolkit_f/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_l/") {
set $sef_entry_point "/.wp-toolkit_l/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_Y/") {
set $sef_entry_point "/.wp-toolkit_Y/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_t/") {
set $sef_entry_point "/.wp-toolkit_t/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_X/") {
set $sef_entry_point "/.wp-toolkit_X/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_3/") {
set $sef_entry_point "/.wp-toolkit_3/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_H/") {
set $sef_entry_point "/.wp-toolkit_H/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_d/") {
set $sef_entry_point "/.wp-toolkit_d/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_T/") {
set $sef_entry_point "/.wp-toolkit_T/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_i/") {
set $sef_entry_point "/.wp-toolkit_i/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_F/") {
set $sef_entry_point "/.wp-toolkit_F/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_R/") {
set $sef_entry_point "/.wp-toolkit_R/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_9/") {
set $sef_entry_point "/.wp-toolkit_9/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_w/") {
set $sef_entry_point "/.wp-toolkit_w/index.php?$args";
}
if ($uri ~* "^/\.wp\-toolkit_U/") {
set $sef_entry_point "/.wp-toolkit_U/index.php?$args";
}
location @wpt_permalinks_fallback {
try_files $uri $sef_entry_point;
}
error_page 404 = @wpt_permalinks_fallback;
error_page 405 = @wpt_permalinks_fallback;