WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Redirects for Mutisite 3.5-beta3 (9 posts)

  1. Hugh
    Member
    Posted 1 year ago #

    I am using Multisite in a folder. - so not the root. It was a pre-existing wordpress blog. I have it set to use sub.domains.com not folders domain.com/sub
    My folder looks like this:

    www/wordpress/

    I have the Redirects presented below which it said to put in the .htaccess file in the file (see screen shot here):

    www/wordpress/.htaccess

    But I think this is wrong. I think it should be in the .htaccess file at

    www/.htaccess

    This is where they would go with a single install. Am I correct or is the directions correct?

    # BEGIN WordPress
    # RewriteRules commented out after starting multi site but present prior to
    # and carried over from single site.
    
    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    #RewriteRule ^index\.php$ - [L]
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]
    #</IfModule>
    
    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).*) wordpress/$1 [L]
    RewriteRule ^(.*\.php)$ wordpress/$1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    The reason I am asking is because when I added the redirect rules to the .htaccess file it throws in this pretty link: domain.com/blog/2008/09/02/post-slug

    Under single site my pretty link settings were to have domain.com/post-slug and that is what I want to retain. Well I went to go adjust these in the admin panel and WP kicked me out and made me sign in again. I tried this repeatedly but I get redirected to the login page again. I thought well my password might be bad so I went into phpmyadmin and changed it per the codex but that is no longer the issue. What do I need to do? do the ReWrite Rules need to be inside the <IfModule> tages?

  2. Hugh
    Member
    Posted 1 year ago #

    Oh, I have tried putting the Rewrite rules between the </IfModule> tags too. same problem...

  3. Evan Solomon
    Member
    Posted 1 year ago #

    I mentioned this on Trac also, but I'll copy it here for full coverage.

    The htaccess instructions were fixed in r22982.

  4. Hugh
    Member
    Posted 1 year ago #

    So does this mean I need to delete the currently active rules and then update to the nightly and then re-apply the redirect rules?

    Also: for the maintainers... the screenshot above where the red circle is, that path needs adjusted when the subdomain option is evoked.

  5. Hugh
    Member
    Posted 1 year ago #

    @Even, Oh I think I mis read what you wrote, I see that you are referencing the bad instructions, not my bad Rewrite rules... but I remain locked out of my install.

  6. Hugh, upgrade to trunk first, before we go a-hunting :)

    The screenshot link doesn't work, BTW.

  7. Hugh
    Member
    Posted 1 year ago #

    @Ipstenu,

    Thanks I just did that, or actually I upgraded to 3.5-BetaRC5. Also I re-shared the image above and here it is.

    And I can verify that the instructions were fixed. I also realized (by looking here) that the I was missing

    $base = '/'; from the code set below:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'example.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    I am pretty sure that just copy and pasted from what was given to me in RC3. In fact if you look at the screen shot from RC3, the missing code is not in there. RC3 is now behind us, so no sorrow there, but I wonder what it says in RC5. I didn't set up a clean database and I don't see a quick and easy way to un-install the network tables, which are needed for WP to automagically allow me to set-up a sub.domain based install. (otherwise WP detects a network already present and only offeres me a sub/folder based approach. )

    I added the $base = '/'; and worked my way backwards so now I have multisite working with one exception.

    1. I tried to use the link provided in this image to go from the admin menu to the specified site. When I click the menu link it goes to$base/wordpress/wordpress/wordpress/wordpress where $base is my domain name. (You can see the actual domain name in the images, but I am not using in the forums - that just seems like best practice.) and there seems to be no end to the number of wordpress/ segments in the url before things time out.
  8. Going through the steps myself...

    1. Install WP in ipstenu.loc/wp
    2. Change URLs to run from ipstenu.loc
    3. Verify pretty permalinks work right
    4. Multisite me!
    5. http://cl.ly/image/3j1s1W2k0E1T

    So ... It works as expected if you flip to root before Multisiting.

  9. Hugh
    Member
    Posted 1 year ago #

    Thanks. I totally got this now...
    I totally removed the $base = '/'; and went back and deleted the /wordpress from the install location and now all seams to be in order. But from a UX perspective it is a bit counter intuitive to remove the /wordpress from the single wordpress install before upgrading to multisite. Page 13 of your 101 book helped me (I think i missed it the first time because the example is spread across two pages.). thanks again.

    I am not sure why $base = '/'; is included in your book...

Topic Closed

This topic has been closed to new replies.

About this Topic