WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Multi site subfolder setup : images dont show on subsites. (18 posts)

  1. raarup
    Member
    Posted 2 years ago #

    Hello,

    Ive been fiddling around with wordpress for sometime now, Im currently building http://www.mobilebozo.com and it all seems to work just fine - now we wanted it to become a network, so we followed the instructions on how to create the network within wordpress - I can create sites such as this :

    http://mobilebozo.com/jespertest02/

    But as you can see, the picture in there is broken - on our main site, wwww.mobilebozo.com the pictures work just fine.

    Ive followed the guide as I should, did everything - even had my hosting company look at it, noone can see whats worng.

    So I hope someone here can tell me whats up and what needs to be done.

    From what I can see on the server, the location where the picture is stored - compared to where the site calls for the picture - dont match up - But I cant see the solution for it.

    Thank you in advance.

    I use the latest version of WP.

    /Jesper.

  2. Did you double check your .htaccess?

    Do pretty permalinks work on the subsite?

  3. raarup
    Member
    Posted 2 years ago #

    # -FrontPage-
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName mobilebozo.com
    AuthUserFile /home/mobilebo/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/mobilebo/public_html/_vti_pvt/service.grp
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    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]
    </IfModule>
    
    # END WordPress

    Thats my entire htaccess file, seems like the server guys changed it, its not what I remember I wrote in there, also - if I change it according to the guide, my sites will pretty much fail to show.

    I tried that pretty permalink you wrote about, didnt really know it - but I tried to enable it, according to this : http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/

    But it wont save my changes - it returns to its original settings - I cant find the web.config, that he refers too in the guide.

    I feel like such a rookie right now - But Im so lost.

  4. It's okay, we all start out new :)

    Pretty Permalinks - Go to http://codex.wordpress.org/Using_Permalinks#Choosing_your_permalink_structure

    It's really just picking a selection and hitting save. If THAT isn't working, then that's the problem.

    Try using JUST this as your .htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    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]
    </IfModule>
    
    # END WordPress
  5. raarup
    Member
    Posted 2 years ago #

    Hey.

    I used that .htaccess setup you wrote, I can now save the changes.

    I just cant figure out how the settings should be - this is the path to where the picture is stored on the server :

    public_html/wp-content/blogs.dir/11/files/2012/02

    This is what the url shows on the site.

    http://mobilebozo.com/jespertest02/files/2012/02/Koala.jpg

  6. That is correct.

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

    That is what takes the http://mobilebozo.com/jespertest02/files/2012/02/Koala.jpg and translates it to where the file really is. It's magic :)

    AND when it doesn't work, we can start to get idea what's wrong. Yours is showing BROKEN images.

    Can you check if, in your httpd.conf, you have AllowOverride All INSTEAD of AllowOverride None?

  7. raarup
    Member
    Posted 2 years ago #

    Ahh okay, makes some sense to me now - so thats a positive thing eh :)

    I couldnt locate the httpd.conf file myself, so I asked my hosting company to check it for me, this is what they wrote to me.

    [removed]

  8. Okay, that wasn't what we needed (and it had some info you probably didn't want public).

    Ask your host, directly, what AllowOverride is set to.

  9. raarup
    Member
    Posted 2 years ago #

    Hey,

    I finally got the reply from my host - this is what he wrote. :

    "Hello,

    Since .htaccess rules are working for you, you can confirm that the AllowOverRide is not set to none. If AllowOverRide is set to none ,the .htaccess rule will not work for you. Please let us know if you have further concerns."

  10. ianclevettdesigns
    Member
    Posted 2 years ago #

    just making sure...

    have you set permissions of your folders correctly? i know sometimes when working locally when new folders are created they sometimes get default settings of read only/666.

    just asking. sorry if you have tried this. :)

  11. Philip Jones
    Member
    Posted 2 years ago #

    I was having the same problem - images upload fine but then cannot be displayed. My excellent hosting company found the solution. Maybe the problem is the same for you:

    Try calling the ms-files.php script directly:
    Enter something like this in your browser address bar. You won't have the subdomain bit, but a different path instead. You may need to experiment. If you get 'file not found' it means you have the wrong path.
    http://subdomain.mysite.com/wp-includes/ms-files.php?file=2012/02/test.jpg

    If you can see the image, then you know the problem is with the rewrite; if you can't then it suggests your host is blocking the method that ms-files.php uses to display the images.

  12. "Hello,

    Since .htaccess rules are working for you, you can confirm that the AllowOverRide is not set to none. If AllowOverRide is set to none ,the .htaccess rule will not work for you. Please let us know if you have further concerns."

    Dear Host: Being set to ALL is not the same as 'Not being set to none.' Please read what I wrote, or I will take my business elsewhere.

  13. raarup
    Member
    Posted 2 years ago #

    RewriteEngine on
    Alias /bandwidth /usr/local/bandmin/htdocs/
    Alias /sys_cpanel /usr/local/cpanel/sys_cpanel/
    Alias /java-sys /usr/local/cpanel/java-sys/
    Alias /img-sys /usr/local/cpanel/img-sys/
    Alias /akopia /usr/local/cpanel/3rdparty/interchange/share/akopia/
    Alias /mailman/archives /usr/local/cpanel/3rdparty/mailman/archives/public/
    Alias /pipermail /usr/local/cpanel/3rdparty/mailman/archives/public/
    Alias /interchange /usr/local/cpanel/3rdparty/interchange/share/interchange/
    Alias /interchange-5 /usr/local/cpanel/3rdparty/interchange/share/interchange-5/

    ScriptAlias /cgi-sys /usr/local/cpanel/cgi-sys/
    ScriptAlias /mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/

    <Directory "/">
    Options All
    AllowOverride All
    </Directory>

    Got this from the host just now.

  14. raarup
    Member
    Posted 2 years ago #

    Hey,

    Well - got the sites work again.

    but the pictures are still broken - I showed them that link you provided and they changed it to run as subdomain.

    jespertest.mobilebozo.com

    I noticed something, I cant get the new site to use my theme from http://www.mobilebozo.com - I noticed that on the server, there was a wordpress folder added to the rest of it, inside that - there is a theme folder, containing twenty eleven and ten themes. I figured I might have to copy my theme into that folder , before the new sites could use them - but the access to that folder is denied.

    I got the theme, that i called MobilbozoTheme, active in network themes and I deleted all the other themes, among them - the Twenty eleven / ten themes.

  15. If you're using subdomain now, go back to http://codex.wordpress.org/Using_Permalinks#Choosing_your_permalink_structure and make sure you have the right htaccess.

  16. raarup
    Member
    Posted 2 years ago #

    Hey.

    I've had alot of issues with my provider, Im going to change host - is there anyone you could recommend, that has a good knowledge of something like this, so I dont have to run my face aganist a wall.

  17. esmi
    Forum Moderator
    Posted 2 years ago #

    Although we cannot endorse them, there are some hosts listed here. Also searching the forums using the keywords "host" or "hosting" may provide you with some suggestions. However, due to the amount of spam that these topics attract, I'm afraid I will have to close this one.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.