Forums

Permalinks causes 404 error for all pages/posts with multisite install (24 posts)

  1. chrisegg
    Member
    Posted 11 months ago #

    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

  2. Andrea_r
    team pirate
    Posted 11 months ago #

    The htacess file is not being read Yes, it's a common issue. Yes, it's server side.

  3. chrisegg
    Member
    Posted 11 months ago #

    thank you for confirming!

  4. chrisegg
    Member
    Posted 11 months ago #

    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?

  5. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 11 months ago #

    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?'

  6. chrisegg
    Member
    Posted 11 months ago #

    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.

  7. chrisegg
    Member
    Posted 11 months ago #

    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!

  8. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 11 months ago #

    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?

  9. chrisegg
    Member
    Posted 11 months ago #

    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!

  10. Andrea_r
    team pirate
    Posted 11 months ago #

    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.

  11. chrisegg
    Member
    Posted 10 months ago #

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

    Thanks

  12. Andrea_r
    team pirate
    Posted 10 months ago #

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

  13. chrisegg
    Member
    Posted 10 months ago #

    No, and No.

  14. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 10 months ago #

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

  15. Andrea_r
    team pirate
    Posted 10 months ago #

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

  16. chrisegg
    Member
    Posted 10 months ago #

    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!

  17. Andrea_r
    team pirate
    Posted 10 months ago #

    Setup WordPress multisite without changing the htaccess file as suggested.

    and then the admin areas on the sub sites won't work.

    which hosts have you tried?

  18. chrisegg
    Member
    Posted 9 months ago #

    which hosts have you tried?

    I have tried ixwebhosting, which I have 4 other multisites installed on and they work fine. I have tried arvixe.com, bluehost, coolhandle.com...

    and then the admin areas on the sub sites won't work.

    The admin area still works, the sub sites still work. The only thing not working was the uploader, for obvious reasons.

    But this is really strange! I have done MS a ton of times and it was like one day it just stopped working and I get the same issue.

    This was my latest failure, http://humanizeyourbusiness.net/ click on sample page tab.

  19. chrisegg
    Member
    Posted 9 months ago #

    ok so it seems I just found a solution...

    @Ipstenu said, "Can you copy over your .htaccess from one of them?"

    Although I thought I had tried that in the past and it did not work, I just tried it again and it worked...!!!! Thank you!

    Why!? I do not understand why I can not create a new htaccess file and it work, why must I copy one from another working MS site for it to work?

  20. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 9 months ago #

    The best answer I have is "we're all missing something obvious." That there's something, either in the permissions or in the .htaccess, that's different.

  21. Andrea_r
    team pirate
    Posted 9 months ago #

    Depends on how you created that new htaccess file.

  22. karyyyn
    Member
    Posted 5 months ago #

    Hey Chris,

    I know this is an old post, but would you mind copying and pasting your working .htaccess file here? I've run into the same problem (on Bluehost) and would like to see what worked for you.

    Thanks!

  23. Andrea_r
    team pirate
    Posted 4 months ago #

    As explained in the entire thread - it;s not what is IN the htaccess file, its the fact the server is not *reading* it.

  24. chrisegg
    Member
    Posted 4 months ago #

    Hi karyyyn,

    yes @Andrea_r is right...

    However, what I did was took a .htaccess file from another Multisite install that was working. and uploaded it into the directory of the site that was giving me problems.

    That resolved the issue..

    If you want to email me, I can send you my .htaccess file and you can try uploading it.

    [email removed]

Reply

You must log in to post.

About this Topic