WordPress.org

Forums

Multisite on 3.2 breaks permalinks (14 posts)

  1. matt1005
    Member
    Posted 1 year ago #

    Just did a fresh install of WordPress 3.2 for testing purposes. After installing Multi-site via http://codex.wordpress.org/Create_A_Network the permalinks for posts and pages are broken. This is a repeatable behavior.

    Below is an example from my test site and I've just changed the domain to site.com as an example:

    http://site.com/site1/blog/2011/07/05/hello-world/

    With the default install of 3.2, this permalink will work just fine. Apache throws a "Not Found" error after installing Multi-site.

    NOTE: The permalink for the default post in my default install of 3.2 is:

    http://site.com/site2/?p=1

  2. It should be http://site.com/blog/2011/07/05/hello-world/ though, not /site1/blog ....

    It goes like this

    Site1: http://site.com/
    Site1 posts: http://site.com/blog/2011/07/05/hello-world/

    Site 2: http://site.com/site2/
    Site 2 posts: http://site.com/site2/?p=1

  3. And you're on IIS, so you need to set up the web.config file to work with pretty permalinks.

  4. matt1005
    Member
    Posted 1 year ago #

    I'm not running IIS, I'm running Apache on CentOS.

    I understand that the links *should* be different, but that's why I created this post in the forum. Default install of multi-site on WordPress 3.2 breaks permalinks. They simply don't work correctly.

    After installing Multi-site, when I click on a link for a blog post, it throws the Not Found error. So obviously something is wrong.

  5. What's in your .htaccess?

    I just spun up a test site without any issues.

  6. matt1005
    Member
    Posted 1 year ago #

    Weird,

    RewriteEngine On
    RewriteBase /site1/
    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]

  7. Why is RewriteBase /site1/ in there?

    Unless you installed WordPress in the physical FOLDER named site1, it SHOULD be

    RewriteEngine On
    RewriteBase /
    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]
  8. matt1005
    Member
    Posted 1 year ago #

    I literally copied the code from the Settings > Network Setup during the installation process and pasted into the .htaccess file.

    In other words I didn't change anything and I didn't have an .htaccess file previously because this was a test.

    On the filesystem, the blog is installed at:

    /var/www/html/site1/

  9. If you installed it at /var/www/html/site1/, then your sites will be domain.com/site1/site2/.

  10. matt1005
    Member
    Posted 1 year ago #

    From my experiences, each instance of WP is installed at the web root:

    /var/www/html

    Thus

    /var/www/html/site1/
    /var/www/html/site2/

    The dashboard for each instance is:

    http://site.com/site1/wp-admin
    http://site.com/site2/wp-admin

  11. That's not how MultiSite works.

    Install at /var/www/html

    Site #1: site.com
    Site #2: site.com/site2

    And so on and so forth.

    There's only ONE install of WP and it's in /html, so the domain starts at site.com. If you installed in /var/www/html/site1 then your URL starts at site.com/site1

    But you don't ever reinstall in /site2

  12. Yes, but if you installed it from /site1/ and it looks liek you did because that;s the base valeu - then URLs are built from that

    Remember with multisite, you won't have physical folders called /site1/ etc. It will be the install in /var/www/html where you enable multisite.

  13. matt1005
    Member
    Posted 1 year ago #

    *sigh* thanks for trying to help. I suppose I'm not explaining things thoroughly enough. That's my fault. I'm rushing through my responses.

  14. Yeah, a rewind may be in order here :)

    So okay.

    1) Where on your server is your wp-config.php file?

    2) When you set up multisite, you used subfolders, correct?

Topic Closed

This topic has been closed to new replies.

About this Topic