WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Images Broken in subdomain (3 posts)

  1. pnrkumar
    Member
    Posted 1 year ago #

    Hi,
    It seems there is problem with my .htaccess file. The images in main site is displaying properly. But, I cannot upload any images to subdomains. Also the images uploaded before to subdomains is not displaying & broken.

    I've tried checking the images as follows.
    The image url link is: http://subdomain.domain.com/files/2012/08/image.gif

    When I changed the above url to following the images displayed properly.
    http://subdomain.domain.com/wp-includes/ms-files.php?file=2012/08/image.gif

    My .htaccess file
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ wp/$1 [L]
    RewriteRule . index.php [L]

    # END WordPress

    Please help me resolve this issue.

  2. pnrkumar
    Member
    Posted 1 year ago #

    I've restored the .htaccess file from my backup. Now it's working fine...

    If anyone facing the same problem have a look at the new .htaccess file

    # BEGIN 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]
    
    # END WordPress
  3. Prometheus Fire
    Member
    Posted 1 year ago #

    The htaccess code changed a little with v3.5. The snippet of code needed depends on some characteristics of the individual install itself. Here's a little more info on that if anyone else runs into this issue.

    http://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite

Topic Closed

This topic has been closed to new replies.

About this Topic