Forums

[resolved] Domain mapping problem OR file uploading problem? (20 posts)

  1. laciknes
    Member
    Posted 1 year ago #

    Hi all,

    I'm new here, am from HU, so sorry for my bad english.
    Thank you for your help in advance!
    My problem is the following:

    Main site of my WP MS:
    plazakarpitoshu.web.maxer.hu

    I've created, and going to create several sites, like these:

    plazakarpitoshu.web.maxer.hu/szivacseu
    plazakarpitoshu.web.maxer.hu/kormanyborozescom
    plazakarpitoshu.web.maxer.hu/vikibizohu

    I had the problem described here:
    [resolved] MU - Images not appearing (20 posts)

    EXAMPLE:
    Uploading an image to szivacseu subsite:
    Directory link: http://plazakarpitoshu.web.maxer.hu/wp-content/blogs.dir/7/files/2011/05/autos01-150x150.jpg
    Subsite link to the pic: plazakarpitoshu.web.maxer.hu/szivacseu/files/2011/05/autos01-150x150.jpg

    I can correct the problem adding this line to my .htaccess

    RewriteRule ^szivacseu/files/(.*)$ http://plazakarpitoshu.web.maxer.hu/wp-content/blogs.dir/7/files/$1 [L,R=301]

    BUT, when I activate domain mapping, -> http://www.szivacs.eu this option is not working.

    Do you have ideas?
    Many thanks in advance again,
    Laciknes

  2. Tim Moore
    Code Wrangler
    Posted 1 year ago #

    First, remove that .hataccess rule. That shouldn't be needed.

    Second, make sure that you have Apache's mod_rewrite module running and that it is correctly configured.

  3. Andrea_r
    team pirate
    Posted 1 year ago #

    It's an htaccess problem.

  4. laciknes
    Member
    Posted 1 year ago #

    The present status is the following:

    1. .htaccess is the same with the .htaccess available from Ipstenu's link
    /SubFolder Example/

    2. szivacs.eu is the primary domain /plazakarpitoshu.web.maxer.hu/szivacseu is the other/

    ---> I uploaded a picture,

    which you can view here:
    http://szivacs.eu/?attachment_id=6

    or simply the picture here:
    http://szivacs.eu/files/2011/05/autos01-225x300.jpg

    or if you really want to check the picture, click here:
    http://szivacs.eu/wp-content/blogs.dir/7/files/2011/05/autos01-225x300.jpg

    My opinion

    1. idea
    Example: http://www.domain.com/subdirectory/something/image

    Rewrite in .htaccess is not OK, because you rewrite /subdirectory/something/ to /folder/

    http://www.domain.com/subdirectory/something/image
    ---> rewrite to http://www.domain.com/folder/image

    , but using domain mapping this cannot refresh, rewrite

    http://www.newdomain.com = http://www.domain.com/subdirectory

    http://www.newdomain.com/something/image ---> rewrite is not available
    (there's no referring after the first / to subsite ID)

    Is there a RewriteRule which includes the referring if subsite ID by the newdomain.com?

    RewriteRule ^www.szivacs.eu/files/(.+) wp-contents/blogs.dir/7/files [L]

    or something like that...

    2. idea

    Maybe it's all is up to the hosting settings, because the problem is not that the link is not connecting to the image file, but sometimes it's just not appearing.
    I'll try to look up what is "Apache's mod_rewrite module", because I've never heard about that before...

    3. idea
    the masking of the domain & the masking of the file url cannot work both, because both requires, changes /subsite/ so I should choose if I want to have pretty domain; or easy fileupload process...

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    :) your help is appreciated
    i am not a computer scientist; but a simple man, who is learning autodidact way - Many thanks Tim, Andrea, Ipstenu!

  5. Is there a RewriteRule which includes the referring if subsite ID by the newdomain.com?

    That's what this does:

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

    It says 'Hi, http://szivacs.eu/files/2011/05/autos01-225x300.jpg should go through http://szivacs.eu/wp-includes/ms-files.php?file=2011/05/autos01-225x300.jpg which will be sneaky and translate that to http://szivacs.eu/wp-content/blogs.dir/7/files/2011/05/autos01-225x300.jpg hah hah!`

    Now. Since only that last, full, link is working, it's a .htaccess issue. It's not PARSING correctly.

    http://plazakarpitoshu.web.maxer.hu/ is your master domain, I'm assuming.

    http://plazakarpitoshu.web.maxer.hu/wp-content/uploads/2011/05/autos011.jpg works

    http://plazakarpitoshu.web.maxer.hu/wp-includes/ms-files.php?file=2011/05/autos011.jpg does NOT work.

    And of course http://plazakarpitoshu.web.maxer.hu/files/2011/05/autos011.jpg won't work either.

    1) Make sure ms-files.php is there!

    2) We need to see your FULL .htaccess (please wrap it in code tags when you post), cause something's wrong there OR your server isn't set up correctly (unlikely since the CSS is showing)

  6. Andrea_r
    team pirate
    Posted 1 year ago #

    And the autodidact way is how we *all* learned how to do this. ;) Something is funky on your setup because the image rewriting does work on domain mapped sites.

  7. laciknes
    Member
    Posted 1 year ago #

    Oh, first now I restored ms-files.php :)
    I removed it during my trying to solve the problem... X-(

    If you please try the links again, you will see, that the code is not 404, but nothing. The picture is not appearing!

    http://szivacs.eu/files/2011/05/autos01-225x300.jpg
    http://szivacs.eu/wp-includes/ms-files.php?file=2011/05/autos01-225x300.jpg
    http://szivacs.eu/wp-content/blogs.dir/7/files/2011/05/autos01-225x300.jpg

    "It says 'Hi, http://szivacs.eu/files/2011/05/autos01-225x300.jpg should go through http://szivacs.eu/wp-includes/ms-files.php?file=2011/05/autos01-225x300.jpg which will be sneaky and translate that to http://szivacs.eu/wp-content/blogs.dir/7/files/2011/05/autos01-225x300.jpg hah hah!`"

    The final result should be - i think - that the url is still:
    http://szivacs.eu/files/2011/05/autos01-225x300.jpg <---this,
    but in the same time the picture will be pushed in from here:
    http://szivacs.eu/wp-content/blogs.dir/7/files/2011/05/autos01-225x300.jpg --- Am I right?

  8. laciknes
    Member
    Posted 1 year ago #

    My .htaccess is simple, i've created it

  9. laciknes
    Member
    Posted 1 year ago #

    RewriteEngine On
    RewriteBase /
    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).*) $1 [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
  10. The front-facing URL SHOULD be http://szivacs.eu/files/2011/05/autos01-225x300.jpg

    Did you mess with any other core files?

    And can we try this on http://szivacs.eu/ with the default theme?

    FYI, both
    http://plazakarpitoshu.web.maxer.hu/wp-includes/ms-files.php?file=2011/05/autos011.jpg
    and
    http://plazakarpitoshu.web.maxer.hu/files/2011/05/autos011.jpg

    are still giving up 404s. Are these the same server?

  11. laciknes
    Member
    Posted 1 year ago #

    Dear Ipstenu,

    Please let's try we both the same file together.
    I've added a new picture, showing a hot blond girl/ not naked :)

    Front facing
    http://szivacs.eu/files/2011/05/hotgirl.jpg
    PHP redirectin
    http://szivacs.eu/wp-includes/ms-files.php?file=/2011/05/hotgirl.jpg
    Directory path
    http://szivacs.eu/wp-content/blogs.dir/7/files/2011/05/hotgirl.jpg

    Isn't it disturbing that the girl is not appearing, at any time?

    My opinion is, that some kind of "legitimacy settings" is not right, /I am not sure if I use the appropriate specialized word. I mean f.e. 777 775 770.. and so on.
    Is that possible?

  12. Trust that I know how this works :) The fact that the pages are BLANK is a php error. That implies one of three things:

    1) Your server isn't reading the .htaccess correctly (unlikely since everything else is fine).
    2) You have corrupt/changed files (possible, since you already said you messed with the files)
    3) You have a plugin/theme conflict.

    2 and 3 are most likely. So what you do is this:

    Manually reinstall WordPress (just copy the files up). DO NOT mess with your wp-config.php file or your .htaccess or the wp-content folder. Just re-upload all the core WP files. You already said you messed with at least one, let's make SURE we're starting from the right level point.

    If that doesn't work, turn off all your plugins. Yes, all. Even the ones in mu-plugins,

  13. Andrea_r
    team pirate
    Posted 1 year ago #

    And php should be logging errors on the server in an error_log file somewhere. Or turn debugging on. It;s a lot easier to find when you know what the error is.

  14. laciknes
    Member
    Posted 1 year ago #

    I've manually reinstalled the stuff, nothing...

    than:
    I've deleted everything... I've found a free theme installed, which could have caused problems... I could hardly delete! We'll see

  15. laciknes
    Member
    Posted 1 year ago #

    which one do you use?

    subirectories, or subdomains?

  16. laciknes
    Member
    Posted 1 year ago #

    "Please make sure the Apache mod_rewrite module is installed as it will be used at the end of this installation."

    How can I make sure of that?
    /I honestly admit I missed that step before :D/

  17. laciknes
    Member
    Posted 1 year ago #

    Could you please check what could be the difference??

    http://szivacs.eu/?attachment_id=48

    http://szivacs.eu/?attachment_id=49

    Same picture, first image upload in not successful, second time yes...

  18. Both work.

  19. Andrea_r
    team pirate
    Posted 1 year ago #

    Same girl, both shots. yep.

Topic Closed

This topic has been closed to new replies.

About this Topic