error 404 on all sub-pages in a multisite environment after installing W3 Total Cache

i am on the latest Wordpress MU. The last changes i did was added W3 Total Cache and replace the htaccess config.

After that was done , i have Error 404 page on all sub-pages for the only 3 sites with a theme/content.

Can i get assistance on this issue with my current subscription?

  • Tyler Postle

    Hey Adam,

    Hope you're doing well today and welcome to the WPMU DEV Community!

    We are happy to help wherever we can :slight_smile:

    What did you replace the .htaccess config with?

    Make sure you have this in there:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    That is the required code for your multisite setup. Removing that would cause 404's like you're seeing now.

    If adding that doesn't work, then try replacing all the code in there with just that default multisite code.

    If it's still not working then let us know and we can have another look :slight_smile:

    All the best,
    Tyler

    PS. Doing a plugin conflict check would be a good idea too, deactivating all plugins to see if any of them are causing the issue - especially your w3tc cache one.

  • Tyler Postle

    Hey Adam,

    Thanks for your reply!

    You might want to ask your server admin on that one as it looks to be server related.

    I changed your "Page Cache" to just Disk Basic and that removes the warning.

    Have you tried adding the .htaccess code in addition to the required access code? Or you have both and it's still giving the error when you switch to "Page Cache" disk enhanced?

    I found a person with a similar issue here: https://wordpress.org/support/topic/rewrite-rules-not-working-for-enhanced-disk-cache#post-5884315

    You could try that solution :slight_smile:

    Hope this helps Adam and hope you don't mind I left your Page Cache as "disk: basic" thought you might want it without the warning until it is sorted out.

    Cheers,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.