• Resolved chrisegg

    (@chrisegg)


    I just installed a new WordPress site and set it up as Multisite. Now the pages/post are all displaying a server 404 error.

    I have an .htaccess file with the correct content.
    I have tried changing and re-saving the permalinks.
    I have tried reinstalling WP and reinstalling multisite 4 times.
    I have called my hosting company they assure me it is not them (i’m not convinced)

    I have 3 other WPMS setup on the same server and they work fine..

    Any ideas would be appreciated!

    thanks

Viewing 15 replies - 1 through 15 (of 27 total)
  • The htacess file is not being read Yes, it’s a common issue. Yes, it’s server side.

    Thread Starter chrisegg

    (@chrisegg)

    thank you for confirming!

    Thread Starter chrisegg

    (@chrisegg)

    Ok, so I put the following code into my .htaccess file as instructed when I installed Multisite, which did not work…

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    
    # END WordPress

    My hosting provider changed the code to what is below and now it works fine…?

    AddHandler phpini-cgi .php
    Action phpini-cgi /cgi-bin/php5-custom-ini.cgi
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Isn’t that the code for a single WP install? Why is that working and not the batch for the multisite install?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    De-bolded your post. Ow. My eyes πŸ˜‰

    Yes, yes it is. Try this:

    AddHandler phpini-cgi .php
    Action phpini-cgi /cgi-bin/php5-custom-ini.cgi
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress

    If that doesn’t work, go back to your host and say ‘Gee thanks, but that’s the .htaccess for SINGLE site WordPress. I want to use MULTISITE, and that IS the right .htaccess for it. Do you guys support that or what?’

    Thread Starter chrisegg

    (@chrisegg)

    Thanks for the suggestion, but no luck! When I added what you sent me this is what I get when I go to my site…

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

    So then I removed the portion below, and the site comes back up, but permalinks don’t work.

    AddHandler phpini-cgi .php
    Action phpini-cgi /cgi-bin/php5-custom-ini.cgi

    I know they support Multisite because I have 3 other Multisite systems setup on the same server.

    Back to the drawing board. πŸ™‚ I will try calling them again, but they are becoming a pain to deal with.

    Thread Starter chrisegg

    (@chrisegg)

    Oh, and now that I switched the code, neither of them work, permalinks no longer work for any of the code variations above…???

    This is strange!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    I know they support Multisite because I have 3 other Multisite systems setup on the same server.

    Can you copy over your .htaccess from one of them?

    Thread Starter chrisegg

    (@chrisegg)

    No, well I guess if I change the name so I can download it to my computer and then upload it and change the name again…

    I tried copying the contents of the file, but that did not work!

    On severs you can explicity state which accounts / folders / subfolders are able to use htaccess files and which do not.

    That’s the main reason I see when troubleshooting sites where the htaccess doesn’t work.

    Thread Starter chrisegg

    (@chrisegg)

    Andrea_r how do I “explicity state which accounts / folders / subfolders are able to use htaccess files and which do not.”

    Thanks

    Are you on a vps or dedicated? Do you have ssh access?

    Thread Starter chrisegg

    (@chrisegg)

    No, and No.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Then you call your host and tell them that .htaccess isn’t working on that account.

    Then you can’t change what you need to. only your webhost can. Ask their support team.

    Thread Starter chrisegg

    (@chrisegg)

    Ok, I’ll try that for the third time (of course I have to argue with them because it cannot be there fault), but I think it is something else. I have had the same issue now with three different hosting providers.

    The only way I have gotten it to work on all three providers is to follow this procedure.

    1. Install WordPress
    2. Change Permalink structure (so the htaccess file is created automatically)
    3. Setup WordPress multisite without changing the htaccess file as suggested.

    That is the only way I can get permalinks to work…I know it creates other issues…

    PS. Thank you everyone for you help!

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Permalinks causes 404 error for all pages/posts with multisite install’ is closed to new replies.