WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 3.2.1. multisite - /blog and /file (7 posts)

  1. andreawp
    Member
    Posted 2 years ago #

    Dears, i've made my site multisite and now the site have 2 blogs.

    the main domain is http://www.quercialuce.it
    the 2 blog domain is http://www.quercialuce.it/ricette

    Now my posts that are refered to the main direcotry (blog1)are in /blog directory and can't be moved or modifie. How can I modifie this directory into /blog-vino?

    And images of the new blog are uploaded into wp-content/blogs.dir/2/files and the url that appear is http://www.quercialuce.it/ricette/files/2011/11/samplename.jpg
    I would like that "files" change into "immagini-ricette"

    Any suggestions?

    Thanks

  2. Now my posts that are refered to the main direcotry (blog1)are in /blog directory and can't be moved or modifie. How can I modifie this directory into /blog-vino?

    Yes, by default if you use subdirectory WordPress Mutlisite, your primary site adds /blog/ to your URL, and you cannot remove it.

    Also changing the /files/ foldername is complicated, and I wouldn't suggest doing it.

  3. andreawp
    Member
    Posted 2 years ago #

    Thank you for the quick response.

    It's only to have a seo friendly url, and to have less keywords like "files". Anyway I hope that in future these changes can be made.

    Thank you

  4. Those URLs won't be any more or less SEO friendly than the ones you're suggesting. At that point in the game, they really don't matter a bit.

  5. andreawp
    Member
    Posted 2 years ago #

    Ok, to change /file directory for the upload file on blog2 I modified functions.php in wp-includes, line 2251

    $url = str_replace( UPLOADS, 'NEW FOLDER', $url );

    and htaccess

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?NEW FOLDER/(.+) wp-includes/ms-files.php?file=$2 [L]

    now seems to work :)

  6. andreawp
    Member
    Posted 2 years ago #

    Now with the wordpress update 3.3 the line is 2259
    $url = str_replace( UPLOADS, 'NEW FOLDER', $url );

  7. Just for the record, editing CORE files is never the right thing to do.

Topic Closed

This topic has been closed to new replies.

About this Topic