• Resolved geekscouk

    (@geekscouk)


    Hi – I have a multisite witha problem when it comes to uploading images into a post.

    I have a sub-domain install with one ‘main’ website on the www domain with a couple of smaller websites using 2 sub-domains.

    Image upload for www is fine – the site’s editor can upload images and be given the right ‘Link Url’ which is of the form

    https://www.mydomain.com/wp-content/uploads/2011/07/upload.jpg

    However, on the subdomains when he tries to do the same thing the ‘Link Url’ the media uploader gives is of the form

    https://subdomain.mydomain.com/files/2011/07/upload.jpg

    This image won’t show. If I then edit the html for the post so the link is of the wp-content/uploads form it’s fine.

    I’ve looked at all the settings in Network Admin -> Sites -> Settings including ‘Upload Path’, ‘Upload Url Path’ and Fileupload Url and changed them to make them the same for the subdomain sites as for www but this has no effect.

    Is that a bug? Is there something else I can do?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The image link is correct – it’s what it is supposed to be.

    The issue is the rewrite rules you added when you set up multisite are not being handled properly by the server itself.

    Thread Starter geekscouk

    (@geekscouk)

    Aaaa ha!

    Thanks for your quick reply – yes that was the problem.

    I think installing W3TC Browser Cache after MultiSite may have rewitten my .htaccess file.

    Adding the line

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

    into

    # 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
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    worked.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Link Url in Media Uploader Wrong’ is closed to new replies.