WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Permalinks causes 404 error for all pages/posts with multisite install (28 posts)

  1. chrisegg
    Member
    Posted 2 years 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. The htacess file is not being read Yes, it's a common issue. Yes, it's server side.

  3. chrisegg
    Member
    Posted 2 years ago #

    thank you for confirming!

  4. chrisegg
    Member
    Posted 2 years 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. 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 2 years 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 2 years 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. 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 2 years 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. 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 2 years ago #

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

    Thanks

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

  13. chrisegg
    Member
    Posted 2 years ago #

    No, and No.

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

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

  16. chrisegg
    Member
    Posted 2 years 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. 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 2 years 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 2 years 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. 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. Depends on how you created that new htaccess file.

  22. karyyyn
    Member
    Posted 2 years 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. 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 2 years 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]

  25. Daconix
    Member
    Posted 1 year ago #

    Hello,

    I solved my problem and following problem was:
    Name of mine htaccess file was htaccess but it should be .htaccess I changed this and now everything is working properly.

    server for that reason did not read the file properly, but the site was visible but not links to pages and posts.
    you see whether on server is dot standing in front of the .htaccess

    I hope I helped.

  26. jony10045 - Make your own topic.

  27. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    That was a particularly sneaky spammer. :-(

  28. Given that this is resolved and the OP was almost a year ago, closing. Y'all can make your own topics :)

Topic Closed

This topic has been closed to new replies.

About this Topic