Support » Networking WordPress » convert subdirectories to subdomains

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

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    In your wp-config.php file, there’s a line that says Subdomains and it’s set to ‘false’ right now. Change it to true and your site will flip over.

    Now that said… You may want to consider .htaccess redirecting the old URLs to the new ones. But it should work just that easily.

    Hey,

    Looking to do that same thing. An suggestions on using .htaccess to redirect the old URLs to the new ones?

    Thanks
    Grant

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    In your wp-config.php file, there’s a line that says Subdomains and it’s set to ‘false’ right now. Change it to true and your site will flip over.

    New sites, but not existing sites.

    You’ll have to fix the addresses on all the old sites to subdomains.
    you’ll have to update any links.

    and yes, you will have to update the htaccess file as well.

    tho we do state here in the forums it can be done, and provide instructions, this was mostly for the benefit of users who had picked the wrong option on install, and did not have live sub-sites to worry about.

    Changing over live existing sites on the network is not such an easy prospect. Do-able, yes. easy? Not so much.

    I would never try anything easy! 🙂 haha

    I’m trying to make sure I completely understand everything before attempting it later tonight.

    1. BACKUP everything. ha
    2. Switch from False to True.
    3. Fix the addresses for all the sites. I’m assuming thats under the Super Admin settings?
    4. Use .htaccess to redirect all old URLs to the new ones.

    Thanks
    Grant

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    2b. update htaccess file with subdomain rules. 😉

    and for step 3, under Super Admin, Sites.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    And step 4 you want stuff like this ABOVE the wordpress code in your .htaccess

    # SubDomains
    RewriteCond %{HTTP_HOST} ^subsite.domain.tld [OR]
    RewriteCond %{HTTP_HOST} ^www.subsite.domain.tld
    RewriteRule ^(.*)$ http://domain.tld/subsite/$1 [R=301,L]

    Thanks! I’ll let you know how my adventure goes…

    Hey, should the files upload path be changed from:

    http://www.xxxxx.com/xxxxx/files

    to

    http://xxxxx.xxxxx.com/files

    Thanks
    Grant

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    No, that’s fine.

    The /files/ stuff gets redirected anyway in the back end 🙂

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    Wait, yes – you DO need to change the files uploads from the previous subfolder to the subdomain.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    DOH! I’m just epic fail on this one!

    Change http://www.domain.com/site/files to http://site.domain.com/files

    Too many X’s 😉 That’s MY excuse!

    Thanks! Everything went off with any problems, looks great! 🙂

    Hey Nice People!

    I did a fresh install, enabled multisite, but had a brain freeze and chose the subdirectory radio button instead of the subdomain radio button. I changed the SUBDOMAIN line to TRUE in my wp-config.php and the URLS flipped over as promised.

    Am I correct in thinking I can now go ahead and create new sites without editing anything in .htaccess, since ther are no links or whatnot to be concerned with?

    Thanks!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Should be fine. Just make sure you have the right .htaccess for subdomains in general! 🙂

    where might I aquire the “right .htaccess for subdomains in general! :)”?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘convert subdirectories to subdomains’ is closed to new replies.