Support » Alpha/Beta/RC » 3.5-beta2 multisite htaccess issue

  • Hello – I am looking into installing WordPress for the first time, and I have run into a snag with the .htaccess for a path-based multisite.

    my site is currently at:
    plaidscape.net/php-bin/wordpress/

    My install location looks like:

    /php-bin/wordpress/
    which is a simlink to
    /php-bin/wordress-3.5-beta2/

    When I initially edit my wp-config.php, I added the line

    define('WP_ALLOW_MULTISITE', true);

    I then fire up the install at:

    plaidscape.net/php-bin/wordpress/wp-admin/install.php

    Everything goes swimmingly. After logging in, I goto tools->Network Setup, and it gives me the following for my wp-config:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'plaidscape.net');
    define('PATH_CURRENT_SITE', '/php-bin/wordpress/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    and for the .htaccess

    RewriteEngine On
    RewriteBase /php-bin/wordpress/
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) php-bin/wordpress-3.5-beta2/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ php-bin/wordpress-3.5-beta2/$2 [L]
    RewriteRule . index.php [L]

    I logged out, logged back in, created a new site called plaidspots. Now, whenever I tried to go to the dashboard of a site (eg plaidscape.net/php-bin/wordpress/plaidspots/wp-admin/), I got stuck in an infinite forwarding loop (according to firefox, “Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”).

    I tinkered with the .htaccess until I got:

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

    Which fixed the problem. I’ve left my site in the pre-fixed state, in the event that anyone would like to verify.

    It wasn’t clear to me if this was an artifact of my install, or if this was a bug in the install instructions. If anyone would provide some guidance on where the proper place to call this out, or the correct way to fix this issue, I would greatly appreciate it.

    Thank you

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    It should be the second .htaccess. When you’re in a subfolder, the only thing that changes in the .htaccess is that RewriteBase.

    I can’t get it to come back with anything like that first one. Maybe it’s because of the symlinks?

    Thread Starter theplaidmentat

    (@theplaidmentat)

    Thanks – it may well be the simlinking then. I’ll stowe it away in my personal install notes and make sure I make the changes in future installs.

    Thank you

    I’m having the same issue.

    Running locally on MAMP on OS X 10.8.2 and just pulled a fresh copy of beta 3. I didn’t have this issue in beta 2 though….

    I was able to get everything to work by copying and pasting an old htaccess rewrite from 3.4.3-beta and everything worked.

    I setup multisite (I guess they don’t need a blogs.dir setup for this any more??) and once I create a sub site using subpaths (I have mine setup like this http://localhost/wordpress-beta/test-site) navigating to /test-site returns a 500 server error. It’s almost like the rewrites it spits out in the beta is missing something or there’s a typo. Here’s the rewrites it tells you to use.

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

    This rewrite returns a 500 error, then if I update to the old rewrites

    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    everything runs just peachy in 3.5-beta3. The difference I can find is the lack of the rewrite for the ms-files.php? But it’s obvious the supplied htaccess rewrites has a typo in there some where. Not an htaccess guru… so any insight would be sweeeeet 😛

    EDIT* ok, I see more of a difference now besides the ms-files.php rewrite… anyways, it seems something is off in beta3. Can anyone else duplicate?

    Hi, I also had problems setting up multisite in 3.5 beta 3.

    I’m not at all proclaiming to be knowledgeable on WordPress or php, but I’ve set up multisite several times now without a hitch, and setting it up for 3.5 Beta 3 was the first time I had a problem.

    Error message:

    500 Server Error
    A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again.

    To get around it (for now), I simply copied-and-pasted .htacess file from 3.5 beta 2, and adjusted the url. But the code generated automatically for network setup in 3.5 beta 3 did not work for me.

    Here’s the 3.5 beta 3 rewrite rules given to me by WordPress.

    RewriteEngine On
    RewriteBase /wpbeta3/wordpress/
    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Thanks again for any insights you may have!

    Follow up to above. I’ve reattempted setting up 3.5 version 3, multisite again as a new install, and this time, I had no error messages.

    Maybe the Internet was burping the first time I tried it; this morning there were no problems with set up, so please accept my apologies for the earlier message.

    Sorry, it looks like I spoke too soon. I’m getting an error message when I try to add the first sub-site (as a folder):

    Notice: Undefined variable: s in /home3/redhoun1/public_html/wpbeta3b/wordpress/wp-admin/network/site-new.php on line 88

    Warning: Cannot modify header information – headers already sent by (output started at /home3/redhoun1/public_html/wpbeta3b/wordpress/wp-admin/network/site-new.php:88) in /home3/redhoun1/public_html/wpbeta3b/wordpress/wp-includes/pluggable.php on line 876

    I have no new plugins installed (other than the default).

    There were/are two plugins on site when I tried to set up sub-site; neither was activated at the time of setting up the subsite (folder).

    They are:

    Akismet, and Hello Dolly.
    Link to test site: http://red-hound.com/wpbeta3b/wordpress/

    Here’s the options I have available to me (copied and pasted):

    On SUB Site
    Show on screen
    Page Attributes Featured Image Custom Fields Discussion Slug Author

    On MAIN site

    Show on screen
    Page Attributes Featured Image Custom Fields Discussion Comments Slug Author Revisions

    Moderators, should I post this in the multisite forum instead of this one?

    Thanks again for all your help–I know everyone is crazy busy out there!

    Sorry, never mind that last….I’m beginning to see how the support forum works now. I should have broken up my posts individually, instead of lumping all the problems together. I’ll get it right next time.

    I also see I left out a line when describing problems with multisite above. Before the line “Here’s the options I have available to me (copied and pasted)” SHOULD read “When creating pages in admin……”

    So, to clarify, the above should read:

    When creating new pages in admin,
    Here’s the options I have available to me (copied and pasted):

    On SUB Site
    Show on screen
    Page Attributes Featured Image Custom Fields Discussion Slug Author

    On MAIN site

    Show on screen
    Page Attributes Featured Image Custom Fields Discussion Comments Slug Author Revisions

    Put another way, it appears that even though I am logged in as “Super Admin” on my subsite, I don’t have all the options I normally do as a Super Admin.

    Again, my apologizes to all for the rough handling of this post–it’s my first one to the forum. I’ll break it down into components for future entries.

    Hi, this morning I downloaded WordPress 3.5 release candidate one, enabled it as multisite, and have had none of the troubles I had earlier. Thanks to the WordPress team for ALL the amazing, awesome hard work for such an amazing platform that WordPress is.

    For me personally, I would consider this particular issue resolved, but I’ll defer to Cole Geissinger for any further concerns with .htaccess.

    Thanks again to all.

    Sadly, I get the 500 internal server error still 🙁

    What I have found, is that if I do a fresh WP install of 3.5, I get the error in any sub site I create, basically rendering Multisite useless 🙁

    BUT if I use the WordPress Beta Testers plugin and tell it to update with the bleeding edge nightlies, I can update an older version and everything works fine…? I still think there’s a misconfiguration in the htaccess, but this must be something local to me or else I don’t think we’d be hitting RC1 if this was a global issue…. Does any one have issues installing and setting up a multisite in a folder like I did? I’ve always done it like this with no problems.

    http://localhost/wordpress-3-5/test/wp-admin returns with internal server error 500 for the admin area, and then the URL rewrites don’t seem to translate for the frontend because all the stylesheets and javascript return with 404’s 🙁

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    What I have found, is that if I do a fresh WP install of 3.5, I get the error in any sub site I create, basically rendering Multisite useless 🙁

    Cole, are you installing in http://localhost/wordpress-3-5/test/ and setting up the ‘run WP in it’s own folder, but pretend it’s one level up’ ?

    test is the sub-site I created.

    So the root install is http://localhost/wordpress-3-5/ Everything works fine here, but once I go to the network admin and create a sub-site, like test here, I get the error.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Okay, I think you have a different error here 🙂

    Can you verify that Pretty Permalinks worked at http://localhost/wordpress-3-5/ before you turned on Multisite?

    Just reinstalled a fresh copy without multisite and permalinks are working with no problems.

    I setup back up multisite again with a different named sub-site and the problem continues. Not sure I’m missing something here?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    You’re probably doing something wrong. You have to take these things slowly when you run into problems and at every step, check.

    1) Install WP and verify pretty permalinks work
    2) Activate Multisite, changing wp-config and .htaccess, and verify permalinks
    3) Create new site, and verify permalinks (on the main site)
    4) Verify that your subsite’s front end works, and the links on the front end.
    5) NOW go and look at your new subsite’s wp-admin end.

    If at ANY POINT along the way, things get weird, that may be what’s up.

    However, this is not the same issue as the OP, so I’m going to close this. Cole, please make your own topic with this one 🙂

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘3.5-beta2 multisite htaccess issue’ is closed to new replies.