• I have begun to have some issues over the past week with the site not loading or not loading properly (mainly in Chrome and Firefox), as well as a time when the permalink structure reset to the WordPress default, and a couple of times when I’ve been logged out of the WordPress back-end when making edits.

    My web host said that it it was most likely an error with a mis-configured re-write rule in the .htaccess file. I can’t see anything wrong (but am not sure whether I would know if I saw it…)

    The only times I find rewrite mentioned in htaccess are pasted below.

    Do you think this is what the problem is, or something else?

    Thanks

    # BEGIN W3TC Skip 404 error handling by WordPress for static files
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_URI} !(robots\.txt|sitemap(_index)?\.xml(\.gz)?|[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?)
        RewriteCond %{REQUEST_FILENAME} \.(css|js|htc|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
        RewriteRule .* - [L]
    </IfModule>
    # END W3TC Skip 404 error handling by WordPress for static files
    # BEGIN WordPress
    <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
Viewing 3 replies - 1 through 3 (of 3 total)
  • To get started:
    Try to disable the W3 Total cache plugin. Does your site fine then?

    Thread Starter ben1000

    (@ben1000)

    Thanks for reply
    Should have said. I disabled the plugin but the code relating to W3TC is still in .htaccess after it’s been deleted…

    Remove everything from the htaccess file except this:

    # BEGIN WordPress
    <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

    just to see if you get the same errors and site problems.
    You can also disable the permalinks completely for testing purpose.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error with Rewrite Code in htaccess?’ is closed to new replies.