WordPress.org

Support

Support » Multisite » [Resolved] Images Broken in subdomain

[Resolved] Images Broken in subdomain

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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
    Prometheus Fire
    Participant

    @prometheus-fire

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Images Broken in subdomain’ is closed to new replies.