WordPress.org

Ready to get started?Download WordPress

Forums

BulletProof Security
[resolved] Images diappeared - solved by modifying .htaccess (8 posts)

  1. Chris
    Member
    Posted 2 years ago #

    Images in Arras theme in a multi-site setup stopped displaying after BPS installation. The problem could be fixed by disabling in .htaccess the line:
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    Cannot explain why, but now it works again.

    http://wordpress.org/extend/plugins/bulletproof-security/

  2. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    hmm yeah that is odd to me too. I'll take a look at why that is.

    Known issue with Network / MU images not displaying >>> http://www.ait-pro.com/aitpro-blog/3454/wordpress-tips-tricks-fixes/wordpress-network-mu-images-not-displaying-images-not-displaying-in-media-library-images-not-displaying-on-website/

  3. Chris
    Member
    Posted 2 years ago #

    Just in case this helps you: I narrowed it down to one file. Images load with the mentioned RewriteRule re-enabled and a condition added:

    RewriteCond %{REQUEST_URI} !ms-files\.php [NC]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
  4. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    hmm this fwrite content should be dealing with images. ok thanks for the info. I will look into the additional section of code that i used. Also Network / MU .htaccess coding is apparently not guaranteed to work in all cases. at least that is what i ascertained from looking around at all the info on MU / Network sites. And it is known that each person may need to create .htaccess mods to suit their particular needs.

    $bpsMUSDirTop = "# uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]\n
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]\n\n";
    
    $bpsMUSDomTop = "# uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]\n\n";
  5. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    Ok well i tested arras.1.5.1.2-notimthumb.zip with and without the Timthumb .htaccess Skip rule and used the standard MU .htaccess code for a sub directory installation and images displayed correctly. So I am guessing you might have some additional custom set up on your end. By default BPS works fine with the Arras Theme and images display correctly on an MU sub directory installation. Thanks.

  6. CouponCodePlugin
    Member
    Posted 2 years ago #

    I am getting the same issues. We use the WooThemes Biznizz theme and all images in the sidebar for the latest posts are missing. If we get the image properties and use the address used, it does not load the image, but loads a 404 instead. It must be blocking the image address. How can this be corrected?
    Here is the front page: http://BusinessOnline.ph
    and here is a link to one of the images: http://businessonline.ph/wp-content/themes/biznizz/functions/thumb.php?src=wp-content/uploads/6530120259_2b3376dfe4_o.jpg&w=35&h=35&zc=1&q=90

    Please advise

    Many thanks

  7. CouponCodePlugin
    Member
    Posted 2 years ago #

    It is now fixed. It was a permissions issue and it simply needed to be saved again, to add the required settings.

  8. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    Great! Thanks.

    Also for anyone with a Network / MU subdomain site i came across a Network / MU sub domain site where images were not displaying and this was because of the set of .htaccess rules dealing with protecting the includes folders. For exact details see this post >>> http://www.ait-pro.com/aitpro-blog/3454/wordpress-tips-tricks-fixes/wordpress-network-mu-images-not-displaying-images-not-displaying-in-media-library-images-not-displaying-on-website/

    Domain mapping may or may not have been a factor with images not displaying and using these rules. In any case AutoMagic will no longer add the Network / MU includes .htaccess code in the root .htaccess file for ONLY Network / MU sub domain sites in the next version release of BPS.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic