• I’m having issues with my site https://www.aperina.com set up as multisite. The main site aperina.com is working all good. However, i have multi-site subdomain set up.. but my my.aperina.com website is uploading images, but not displaying them correctly.

    I have my account set up for DNS wildcard *.aperina.com pointed to my dedicated IP adress (as instructed by multisite).

    My Main site images are stored in: /wp-content/uploads/2013/04/file.png

    My Multi site (my.aperina.com) images are uploaded to: /wp-content/blogs.dir/2/files/2013/04/file.png

    However, in the front end of my.aperina.com, the image is saying that it’s in; https://my.aperina.com/files/ Which nothing is actually there.

    It looks like the url is missing “/wp-content/blogs.dir/2” on the multisite site before the /files/2013/04/file.png

    I updated my multisite setting for that site for the upload path, upload Url path, and Fileupload Url to “wp-content/blogs.dir/2/files”, But nothing is working… it looks like those settings are not even being propagated (don’t work or something)

    Can anyone help me with this?

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

    (@ipstenu)

    ?????? Advisor and Activist

    My Multi site (my.aperina.com) images are uploaded to: /wp-content/blogs.dir/2/files/2013/04/file.png

    However, in the front end of my.aperina.com, the image is saying that it’s in; https://my.aperina.com/files/ Which nothing is actually there.

    This is 100% correct for a Multisite that was started pre WP 3.5

    The URL is https://my.aperina.com/files/2013/04/file.png

    That gets translated through your .htaccess file, which calls ms-files.php, which pulls out the actual image.

    What’s in your .htaccess?

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    #RewriteEngine On
    #RewriteCond %{HTTP_HOST} ^www.aperina.com [NC]
    #RewriteRule ^(.*)$ https://aperina.com/$1 [L,R=301]

    # BEGIN CI_RETINA
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)\.(jpe?g|gif|png)$ /home/aperinac/public_html/wp-content/plugins/ci-retina/retinaimages.php [L]
    </IfModule>

    # BEGIN WordPress
    RewriteRule ^index\.php$ – [L]

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    redirect /contact /?contact=form

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule . index.php [L]
    # END WordPress
    #
    #php_flag magic_quotes_gpc off
    #RewriteCond %{HTTP_HOST} ^aperina\.org$ [OR]
    #RewriteCond %{HTTP_HOST} ^www\.aperina\.org$
    # RewriteRule ^/?$ “http\:\/\/aperina\.com” [R=301,L]

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    I created a new website on a new domain and installed wordpress 3.5 … Everything works great here. The files are all pointed correctly, so like you said, I guess it’s something to do with wordpress.

    maybe the best thing to do is merge the website somehow to my new server? But i’m sure it’s not easy.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    No, it’s that old WP (3.0 through 3.4) if you set up Multisite, it uses a more complex htaccess which doesn’t always work.

    3.5 the images point to /wp-content/uploads/sites/2/… instead :/

    You would have to install everything fresh to get that format. Or you can try these:

    https://halfelf.org/2012/dumping-ms-files/
    https://trepmal.com/2013/03/24/removing-ms-files-php-dependency/

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    I don’t want to update wordpress.. it seems a little complicated… but i’m fine to stay on the current version of wordpress.. i just want my files to actually work…

    was my .htaccess correct?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I think it has the right parts, but you edited it in a bad way.

    You NEVER want to edit the WP section, you want to add things above it. However I THINK your problem is that retina image plugin. Turn it off and remove it from your .htaccess

    redirect /contact /?contact=form
    
    # BEGIN WordPress
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress
    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    I actually removed the retina plugin code and you are right, that was the issue…

    I installed a different retina plugin and now everything works (well almost – like always)

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    The issue came back… weird.

    Here is my current .htaccess file.

    php_value memory_limit 256M
    php_value max_execution_time 4000
    php_value post_max_size 150M
    php_value upload_max_filesize 150M
    
    RewriteRule ^files/(.+) wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]
    redirect /contact /?contact=form
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress

    i’ve tried disabling these two lines (also deleteing them)

    RewriteRule ^files/(.+) wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]
    redirect /contact /?contact=form

    But the issue still existed.

    https://my.aperina.com/?s=bryan

    You can see the the image link is:
    https://my.aperina.com/files/2012/06/BryanNicole-252×107.png

    I made sure i have the Zone file Records set up correctly for subdomain multisite.

    *.aperina.com. 14400 IN A 72.34.36.71

    What am I doing incorrectly now…

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    looking at it.. it looks like a 403 forbidden error..

    https://my.aperina.com/files/2012/06/BryanNicole-252×107.png

    So something is not allowing it to reach that file… or am I wrong?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘File path in second multisite site incorrect!’ is closed to new replies.