Support » Fixing WordPress » Check my .htaccess

  • liriotherapy

    (@liriotherapy)


    Could you please check my .htaccess please, the file has been modifieed recently, my website is dead,since I updated the wordpress to 5.3, the host need do some changes.
    See bellow:
    # HTTPS forced by SG-Optimizer
    <IfModule mod_rewrite.c>
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    </IfModule>
    # END HTTPS

    # BEGIN WordPress
    # The directives (lines) between BEGIN WordPress and END WordPress are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    <files wp-config.php>
    order allow,deny
    deny from all
    </files>

    # Block WordPress xmlrpc.php requests
    <Files xmlrpc.php>
    order deny,allow
    deny from all
    allow from 123.123.123.123
    </Files>

    # Leverage Browser Caching by SG-Optimizer
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault “access plus 6 months”
    # CSS
    ExpiresByType text/css “access plus 1 year”
    # HTML components (HTCs)
    ExpiresByType text/x-component “access plus 2 months”
    # HTML
    ExpiresByType text/html “access plus 6 months”
    # JavaScript
    ExpiresByType application/javascript “access plus 1 year”
    ExpiresByType application/x-javascript “access plus 1 year”
    # Manifest files
    ExpiresByType application/x-web-app-manifest+json “access plus 0 seconds”
    ExpiresByType text/cache-manifest “access plus 0 seconds”
    # Media
    ExpiresByType audio/ogg “access plus 1 year”
    ExpiresByType image/gif “access plus 1 year”
    ExpiresByType image/jpg “access plus 1 year”
    ExpiresByType image/jpeg “access plus 1 year”
    ExpiresByType image/png “access plus 1 year”
    ExpiresByType image/svg “access plus 1 year”
    ExpiresByType image/svg+xml “access plus 1 year”
    ExpiresByType video/mp4 “access plus 1 year”
    ExpiresByType video/ogg “access plus 1 year”
    ExpiresByType video/webm “access plus 1 year”
    ExpiresByType image/x-icon “access plus 1 year”
    ExpiresByType application/pdf “access plus 1 year”
    ExpiresByType application/x-shockwave-flash “access plus 1 year”
    # Web feeds
    ExpiresByType application/atom+xml “access plus 1 hour”
    ExpiresByType application/rss+xml “access plus 1 hour”
    # Web fonts
    ExpiresByType application/font-woff “access plus 1 year”
    ExpiresByType application/font-woff2 “access plus 1 year”
    ExpiresByType application/vnd.ms-fontobject “access plus 1 year”
    ExpiresByType application/x-font-ttf “access plus 1 year”
    ExpiresByType font/opentype “access plus 1 year”
    </IfModule>
    # END LBC
    # START PHP VERSION CHANGE forced by SG Optimizer
    AddHandler application/x-httpd-php70 .php .php5 .php4 .php3
    # END PHP VERSION CHANGE
    # GZIP enabled by SG-Optimizer
    <IfModule mod_deflate.c>
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE “application/atom+xml” \
    “application/javascript” \
    “application/json” \
    “application/ld+json” \
    “application/manifest+json” \
    “application/rdf+xml” \
    “application/rss+xml” \
    “application/schema+json” \
    “application/vnd.geo+json” \
    “application/vnd.ms-fontobject” \
    “application/x-font-ttf” \
    “application/x-javascript” \
    “application/x-web-app-manifest+json” \
    “application/xhtml+xml” \
    “application/xml” \
    “font/eot” \
    “font/opentype” \
    “image/bmp” \
    “image/svg+xml” \
    “image/vnd.microsoft.icon” \
    “image/x-icon” \
    “text/cache-manifest” \
    “text/css” \
    “text/html” \
    “text/javascript” \
    “text/plain” \
    “text/vcard” \
    “text/vnd.rim.location.xloc” \
    “text/vtt” \
    “text/x-component” \
    “text/x-cross-domain-policy” \
    “text/xml”
    </IfModule>
    </IfModule>
    # END GZIP

    ## EXPIRES CACHING ##

    ## EXPIRES CACHING ##
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>
    deny from 52.17.43.61

    # Wordfence WAF
    # END Wordfence WAF

    # BEGIN WP Performance Score Booster Settings
    # END WP Performance Score Booster Settin

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.