Support » Plugin: W3 Total Cache » 403(Forbidden)

  • Resolved TheDragon

    (@thedragon)


    Hello guys,
    When i check my website on http://www.host-tracker.com/ it shows 403(Forbidden), So i checked everything and found out that W3 Total cache is the problem, This is the code that makes the problem

    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteCond %{HTTPS} =on
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{SERVER_PORT} =443
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteRule .* - [E=W3TC_ENC:_gzip]
        RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
        RewriteRule .* - [E=W3TC_PREVIEW:_preview]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{REQUEST_URI} \/$
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wptouch_switch_toggle) [NC]
        RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache core

    When i remove this code it goes back there 🙁 and i don’t how to fix it i tried reading more than 30 pages but didn’t fix my problem.

    If someone knows how to fix please let me know

    Thank you

    https://wordpress.org/plugins/w3-total-cache/

Viewing 1 replies (of 1 total)
  • I had this .htaccess in my wp-content folder

    # Disable access to all file types except the following
    Order deny,allow
    Deny from all
    <Files ~ ".(xml|css|js|jpe?g|png|gif|pdf|docx|rtf|odf|zip|rar|eot|svg|ttf|woff|svg|ico)$">
    Allow from all
    </Files>

    And as you can see .html and .gzip format are missing in here so i added this two and everything is working fine now

    Working code

    # Disable access to all file types except the following
    Order deny,allow
    Deny from all
    <Files ~ ".(xml|css|js|jpe?g|png|gif|pdf|docx|rtf|odf|zip|rar|eot|svg|ttf|woff|svg|ico|gzip|html)$">
    Allow from all
    </Files>

Viewing 1 replies (of 1 total)
  • The topic ‘403(Forbidden)’ is closed to new replies.