WordPress.org

Ready to get started?Download WordPress

Forums

Subdomain images not working on multi-user subdomains (27 posts)

  1. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    @ipstenu --
    Hoping this works, your profile said to just mention you in the forums.

    I am having the exact same problem as this poster, only I have a subdomain setup, not a subfolder setup. Did anything get worked out with this issue long-term, is there an available workaround somewhere I can't find, or do you know how I could fix it?

  2. That's an old one!

    First, make sure your .htaccess is correct: http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite

  3. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    It is-- cut and pasted directly from there, no dice.

  4. URLs?

    Need to know your main site AND a subsite :)

  5. The very latest will be in *WORDPRESS* itself - not the codex. Go to the Create a network page in your installation. get the latest htaccess rules from THERE.

  6. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    @Andrea -- They're the same.

    @Ipstenu -- Here's the main blog, and here's a network blog.

    Thanks for helping!

  7. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    Note: on the network blog, I manually linked to the files, so they work, but here's a page that shows the way WordPress produces the images automatically.

  8. the page is 500

  9. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    Sorry, mislinked it!

    (Thanks for helping by the way!)

  10. Rock on :)

    So here's the broken image link: http://sketcharmstrong.radicalrobot.com/files/IMG_0136-300x225.jpg

    The .htaccess translates that to this (That's also a 404 by the way.):
    http://sketcharmstrong.radicalrobot.com/wp-includes/ms-files.php?file=IMG_0136-300x225.jpg

    In turn THAT should take us to:
    http://radicalrobot.com/wp-content/blogs.dir/#/files/IMG_0136-300x225.jpg

    Of note, your URL shouldn't be /files/image.jpg, it should be /files/YYYY/MM/image.jpg so you've got some other issues going on here and I'm willing to bet THAT is why the images aren't working.

    You COULD sort it via this:

    RewriteCond %{HTTP_HOST} ^sketcharmstrong.radicalrobot.com
    RewriteRule ^reviews/files/(.*)$ http://sketcharmstrong.radicalrobot.com/wp-content/blogs.dir/2/files/$1 [L,R=301]

    Assuming this is blog #2. But that doesn't resolve the fact that you turned off the organizing uploads into folders by date (which you really need).

  11. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    How do I fix that? I never intentionally turned them off (or it was a looong time ago and I've forgotten...).

  12. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    (It was actually on my to-do list to fix that, but I figured it was secondary to this problem. But if they're related, all the better toward figuring it out!)

  13. It's way easier in singlesite than MultiSite to turn 'em on and off.

    Admin Dashboard -> Network Admin -> Sites

    EDIT the site

    Click on the OPTIONS tab.

    Look for Uploads Use Yearmonth Folders and set it to 1

    That won't fix your already uploaded images, mind you :/

  14. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    I uploaded a new image, and WordPress produces the right URL and they are correctly uploaded to the right folder on the server, the permalink still doesn't work :(

    Thanks for helping, again! This must be a headache... I see no good reason why it shouldn't work perfectly :)

  15. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    I just tried that .htaccess code you suggested, both with Yearmonth Folders as "1" and "0" and uploading and inserting a new image both times, and it didn't work either. Also, the site is number 30, so I changed it to 30, still nothing...

  16. I uploaded a new image, and WordPress produces the right URL and they are correctly uploaded to the right folder on the server, the permalink still doesn't work

    And WHERE would that be?

  17. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    Here, and it also works http://sketcharmstrong.radicalrobot.com/wp-content/blogs.dir/30/files/2011/06/IMG_0135.jpg">here (I've heard it's not supposed to work like that? I can get any file from any domain I'm using...)

  18. Okay, that's actually as it should be (yes, the images work from all sources).

    http://code.ipstenu.org/files/2011/06/cloudalert-135x135.png
    http://code.ipstenu.org/wp-content/blogs.dir/2/files/2011/06/cloudalert-135x135.png
    http://ipstenu.org/wp-content/blogs.dir/2/files/2011/06/cloudalert-135x135.png

    That's correct behavior :) HOWEVER,
    http://ipstenu.org/files/2011/06/cloudalert-135x135.png would NOT work. Again, this is what we expect to happen ;) Absolute paths always work.

    http://radicalrobot.com/files/2011/06/IMG_0135.jpg won't work because that's a SUB domain image being called by the MAIN domain.

    http://sketcharmstrong.radicalrobot.com/wp-content/blogs.dir/30/files/2011/06/IMG_0135.jpg works, as it should.

    http://sketcharmstrong.radicalrobot.com/files/2011/06/IMG_0135.jpg does not nor does http://sketcharmstrong.radicalrobot.com/wp-includes/ms-files.php?file=2011/06/IMG_0135.jpg

    So two possibilities here:

    1) Your server isn't reading .htaccess correctly
    2) Your subdomain setup is bad

    I would put money on number 1. Do you have root access to your server?

  19. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    Via FTP? Yes, I do.

  20. No, not http://FTP... I mean like can you get to and edit your httpd.conf file?

    If you don't know what that means, it's okay, but you'll need to tell your host "My .htaccess file isn't being read completely. I need AllowOveride set to all, and what are the Options set to?"

  21. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    According to Wikipedia, that's at /etc/httpd/httpd.conf-- I do have an /etc/ folder available but nothing like /httpd/ shows up in there. The support forums say we don't have access to it.

    Just sent them a support request-- I'll get back to you when they get to look at it tomorrow.

    Thanks!

  22. Actually it's not ALWAYS in etc/httpd.... which is why I said if you didn't know what it was, ask your host ;)

  23. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    They responded:

    With respect to your questions, here's what we have:

    Options ExecCGI IncludesNOEXEC FollowSymLinks
    AllowOverride All

    As for your .htaccess file not being read or not read (partially read isn't a possible situation), you'd want to investigate whether or not its permissions and ownership are compatible with what you're trying to do -- this might be helpful for troubleshooting: https://members.nearlyfreespeech.net/support/faq?q=PHPWritingFiles#PHPWritingFiles . We'd also recommend turning on your site's error log in case that can provide any additional clues.

  24. Can they change that to

    AllowOverride FileInfo Options

  25. Andrew Jacob Johnson
    Member
    Posted 3 years ago #

    That would actually be a more restrictive setting than "AllowOverride All," which already includes both FileInfo and Options. We'd actually suggest that you and/or the person helping you out do a little more research into what you're trying to do and possibly consult other folks with some familiarity with it, to possibly clear up some of the confusion that's getting in your way.

  26. Actually, we've found when one doesn't work the other will. Crazy, but there ya go.

    Really this setup relies on the htaccess file changes being read. That's totally server side. Not sure why they don't seem to be able to help you.

  27. Point your host here: http://mathiasbynens.be/notes/apache-allowoverride-all

    They are correct in MOST cases, but not ALL.

Topic Closed

This topic has been closed to new replies.

About this Topic