Forums

[resolved] Link Url in Media Uploader Wrong (3 posts)

  1. geekscouk
    Member
    Posted 9 months ago #

    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

    http://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

    http://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?

  2. Andrea_r
    team pirate
    Posted 9 months ago #

    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.

  3. geekscouk
    Member
    Posted 9 months ago #

    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.

Reply

You must log in to post.

About this Topic