WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multisite Upload Problems with Domain Mapping (15 posts)

  1. ulinho
    Member
    Posted 4 years ago #

    Hi folks,

    I haven't found any solution for this problem: I have installed WP3.0 with network enabled using subdirectories and Domain Mapping plugin.

    When I tried to upload a file/image on one of my blogs, I can't access this image with the redirected link, i.e. the image is available at http://mainblog.de/blog1/files/2010/07/contact.jpg but I get a 404 error when I insert this URL into a blog post on my blog1 where the URL will be rewrited to http://www.blog1.de/files/2010/07/contact.jpg in the source code.

    Any idea how to solve this problem?

    Thanks!

  2. ulinho
    Member
    Posted 4 years ago #

    No one any idea?

  3. Can we get a link to your actual site?
    Are you using the built in media uploader?

  4. ulinho
    Member
    Posted 4 years ago #

    Hi Andrea_r,

    the file: http://gblogs.de/filmklinik/files/2010/07/KontaktFilmklinik.jpg
    the article: http://www.filmklinik.de/impressum/

    And yes, I'm using the built-in media uploader.

  5. ulinho
    Member
    Posted 4 years ago #

    Does Domain Mapping require some Apache modules, i.e. mod_proxy? That's my last guess on this problem...

  6. Son-Riab
    Member
    Posted 4 years ago #

    I think this is a problem with your rewrite rules! I had the same problem but after correcting my rewrite rules all seems to work.

    Your rewrite rules should look like this ...

    ... by using subdomains:

    RewriteEngine On
    RewriteBase / ( << depands on where you install 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]

    ... by using subfolders:

    RewriteEngine On
    RewriteBase / ( << depands on where you install wordpress! )
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Check this and also if mod_rewrite is enabled + if apache is using these rules.

  7. Son-Riab
    Member
    Posted 4 years ago #

    Ok, shame on me! It looks like i read your post but did not think about it! Forget the rewrite stuff! ^^

  8. @ulinho you may want to try changing the links to the mapped site so they don;t show the unmapped URL.

  9. ulinho
    Member
    Posted 4 years ago #

    @Son-Riab: Can't be the problem, because my .htaccess-file looks exactly like this.
    @Andrea_r: I hope I interpreted you correctly. When I try to open the mapped link, it doesn't work eiter:
    http://www.filmklinik.de/files/2010/07/KontaktFilmklinik.jpg
    and
    http://gblogs.de/filmklinik/files/2010/07/KontaktFilmklinik.jpg

    Aren't there any Apache-Requirements for the Domain Mapping Plugin? Because I had some problems with unloaded modules before at this hoster.

  10. Aren't there any Apache-Requirements for the Domain Mapping Plugin?

    No more than a standard install requires.

    Do you have the same problem on an UNmapped blog?

  11. ulinho
    Member
    Posted 4 years ago #

    No I don't. On unmapped blogs, upload works fine.

  12. Well when I go direct to http://www.filmklinik.de/ I get access forbidden error.

  13. ulinho
    Member
    Posted 4 years ago #

    This was because I tested something. OK, I have found the problem. Seem to be the rights on folders/files. I don't know why, but when I create the upload folders via ftp and so with the ftp-user, the rewrites work. If the folders are created by the web server, the rewrites dont work. Crazy, but now I have the next problem: how can I change all the rights automatically...

  14. Sounds like a folder ownership issue. (chown, not chmod)

  15. ulinho
    Member
    Posted 4 years ago #

    Yeas, it was. Because the ftp-user hasn't been in one group with the webserver... But problem solved, thanks anyway!

Topic Closed

This topic has been closed to new replies.

About this Topic