Support » Fixing WordPress » 403 errors on all CSS and JS files

Viewing 4 replies - 1 through 4 (of 4 total)
  • Are you using a plugin that caches or combines these???…try deactivating your plugins…

    It was part of my .htaccess file I just added. I removed this section and everything works fine now.

    # 6G:[QUERY STRINGS]
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} !^/$ [NC]
    RewriteCond %{QUERY_STRING} (mod|path|tag)= [NC,OR]
    RewriteCond %{QUERY_STRING} ([a-zA-Z0-9]{32}) [NC,OR]
    RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
    RewriteCond %{QUERY_STRING} (\?|\.\./|\.|\*|:|;|<|>|’|”|\)|\[|\]|=\\\’$|%0A|%0D|%22|%27|%3C|%3E|%00|%2e%2e) [NC,OR]
    RewriteCond %{QUERY_STRING} (benchmark|boot.ini|cast|declare|drop|echo.*kae|environ|etc/passwd|execute|input_file|insert|md5|mosconfig|scanner|select|set|union|update) [NC]
    RewriteRule .* – [F,L]
    </IfModule>

    That looks erroneous at best.

    It’s from a series of .htaccess rules to protect and secure your WordPress install.

    http://perishablepress.com/6g-beta

    I realized however the rule in question was here:

    RewriteCond %{QUERY_STRING} ([a-zA-Z0-9]{32}) [NC,OR]

    That limits the query string to 32 characters so no one attempts any SQL injection via URL. But 32 characters isn’t long enough to the URL to many of the JS and CSS files, especially with the version string attached.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘403 errors on all CSS and JS files’ is closed to new replies.