• Have been developing a wordpress multisite install on Rackspace with a subfolder installation

    The sites were been built BEFORE the domains were changed to point to the base site IP address.

    Any given site had the URL structure http://base_site.com/domainname/

    I am not moving the site or changing the base domain name just trying to get the multisite ‘sites’ to have the correct permalink/URL structure.

    Now when ready to go live with the sites, the A records have been pointed to the base_site IP address and domain mapping is working just fine, the home page is coming up and all is well.

    Having one issue (so far) in that the links generated by wordpress menus are still showing the http://base_site.com/domainname/ structure.
    When I look at permalinks in the admin they also have this structure. Obviously we would like them all to be just http://www.domainname.com. Have tried massaging site paths under ‘sites’ in the super admin including domain & path and site URL under the settings tab but cannot get links to update. Am aware that there may be some database work to be done here but would like to find out first what need updating.

    multisite code from wp-config:

    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'base_site.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    Have created a multisite install before but the DNS was updated before the sites were configured so permalinks were already set.

    Any help greatly appreciated.

    A

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter andy_woz

    (@andy_woz)

    Also a s a note, htaccess contains:

    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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Which matches the code in network setup

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I am not moving the site or changing the base domain name just trying to get the multisite ‘sites’ to have the correct permalink/URL structure.

    Can you explain what you mean here?

    You mean you’re mapping domains?

    Thread Starter andy_woz

    (@andy_woz)

    Yes sorry just mapping domains.
    The domain mapping seems to be working at the top most level but the permalinks need updating.

    Thread Starter andy_woz

    (@andy_woz)

    And by that I mean that the homepage is showing up at http://www.domainname.com but all the url’s to posts, CSS and images etc. are in the form http://base_site/domainname

    Thread Starter andy_woz

    (@andy_woz)

    Ok so I guess I was having a bit of a mind cluster because fixing the linking was as simple as updating the home path to http://www.domainname.com

    I can’t update site_url though as that breaks all the css and images. I am assuming that this is normal with a sub directory set up using aliases at the hosting level or is there a way to fix those paths too?

    Thanks

    A

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The domain mapping seems to be working at the top most level but the permalinks need updating.

    Well. Yes 🙂

    because fixing the linking was as simple as updating the home path to http://www.domainname.com

    Surprisingly, no, this breaks things. Change it back.

    The fix is to search/replace the DB and change the old permalinks. Once you do that for the post content (which actually should cover menus, which are CPTs), you should be fine.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Multisite Site URL's include base URL. Help’ is closed to new replies.