# 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
    <Files wp-config.php>
                    Require all denied
            </Files>

    # "Block access to xmlrpc.php"
    # To remove this rule, revert this security measure on each WordPress installation on this domain
    <Files xmlrpc.php>
                    Require all denied
            </Files>

# "Block directory browsing"
# To remove this rule, revert this security measure on each WordPress installation on this domain
<Directory "/home/cafetg/public_html">
    Options -Indexes
</Directory>

            # "Forbid execution of PHP scripts in the wp-content/uploads directory"
        # To remove this rule, revert this security measure for WordPress installation #108
        <Directory "/home/cafetg/public_html/elipa/wp-content/uploads">
            <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteCond %{REQUEST_FILENAME} \.php$ [NC]
                RewriteRule .* - [F,L]
            </IfModule>
            <IfModule !mod_rewrite.c>
                <FilesMatch \.php$>
                                            Require all denied
                                    </FilesMatch>
            </IfModule>
        </Directory>

                    # "Forbid execution of PHP scripts in the wp-includes directory"
        # To remove this rule, revert this security measure for WordPress installation #108
        <Directory "/home/cafetg/public_html/elipa/wp-includes">
            <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteCond %{REQUEST_FILENAME} \.php$ [NC]
                RewriteCond %{REQUEST_FILENAME} "!^/home/cafetg/public_html/elipa/wp\-includes/js/tinymce/wp\-tinymce\.php$" [NC]
                RewriteRule .* - [F,L]
            </IfModule>
            <IfModule !mod_rewrite.c>
                <FilesMatch \.php$>
                                            Require all denied
                                    </FilesMatch>
                <Files wp-tinymce.php>
                                            Require all granted
                                    </Files>
            </IfModule>
        </Directory>

                # "Disable scripts concatenation for WordPress admin panel"
        # To remove this rule, revert this security measure for WordPress installation #108
        <Directory "/home/cafetg/public_html/elipa/wp-admin">
            <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteCond %{REQUEST_FILENAME} (load-styles|load-scripts)\.php$ [NC]
                RewriteRule .* - [F,L]
            </IfModule>
            <IfModule !mod_rewrite.c>
                <FilesMatch (load-styles|load-scripts)\.php$>
                                            Require all denied
                                    </FilesMatch>
            </IfModule>
        </Directory>

                # "Block author scans"
        # To remove this rule, revert this security measure for WordPress installation #108
        <IfModule mod_rewrite.c>
            <Directory "/home/cafetg/public_html/elipa">
                RewriteEngine on
                RewriteCond %{QUERY_STRING} (^|&)author=\d+
                RewriteCond %{REQUEST_FILENAME} "!^/home/cafetg/public_html/elipa/wp\-admin/" [NC]
                RewriteRule .* - [F,L]
            </Directory>
        </IfModule>

                                # "Block author scans"
        # To remove this rule, revert this security measure for WordPress installation #110
        <IfModule mod_rewrite.c>
            <Directory "/home/cafetg/public_html">
                RewriteEngine on
                RewriteCond %{QUERY_STRING} (^|&)author=\d+
                RewriteCond %{REQUEST_FILENAME} "!^/home/cafetg/public_html/wp\-admin/" [NC]
                RewriteRule .* - [F,L]
            </Directory>
        </IfModule>

        # "Block access to sensitive files"
    # To remove this rule, revert this security measure on each WordPress installation on this domain
    <LocationMatch "(?i:(?:wp-config\\.bak|\\.wp-config\\.php\\.swp|(?:readme|license|changelog|-config|-sample)\\.(?:php|md|txt|htm|html)))">
                    Require all denied
            </LocationMatch>

    # "Block access to potentially sensitive files"
    # To remove this rule, revert this security measure on each WordPress installation on this domain
    <LocationMatch ".+\\.(?i:psd|log|cmd|exe|bat|csh|ini|sh)$">
                    Require all denied
            </LocationMatch>

    # "Disable PHP execution in cache directories"
    # To remove this rule, revert this security measure on each WordPress installation on this domain
    <LocationMatch "(?i:.*/cache/.*\\.ph(?:p[345]?|t|tml))">
                    Require all denied
            </LocationMatch>

    # "Block access to .htaccess and .htpasswd"
    # To remove this rule, revert this security measure on each WordPress installation on this domain
    <Directory "/home/cafetg/public_html">
        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} /\.ht[^/]*$ [NC]
            RewriteRule .* - [F,L]
        </IfModule>
        <IfModule !mod_rewrite.c>
            <FilesMatch ^(?i:\.ht.*)$>
                                    Require all denied
                            </FilesMatch>
        </IfModule>
    </Directory>

    # "Enable bot protection"
    # To remove this rule, revert this security measure on each WordPress installation on this domain
    <IfModule mod_rewrite.c>
        <Directory "/home/cafetg/public_html">
            RewriteEngine on
            RewriteCond %{HTTP_USER_AGENT} "(?:acunetix|BLEXBot|domaincrawler\\.com|LinkpadBot|MJ12bot/v|majestic12\\.co\\.uk|AhrefsBot|TwengaBot|SemrushBot|nikto|winhttp|Xenu\\s+Link\\s+Sleuth|Baiduspider|HTTrack|clshttp|harvest|extract|grab|miner|python-requests)" [NC]
            RewriteRule .* - [F,L]
        </Directory>
    </IfModule>

