Support » Networking WordPress » No images when site name is in file name

  • I use the WordPress Multisite on a network site that isn’t online yet. It works almost perfect. The only problem I have is that files with (partly) the same name as the site name are redirected to a non-existing page.

    Example:

    I upload a file on sitename.network.com with the name sitename.png.
    The file is uploaded successfull and the file exists (checked ftp).

    However, if I try to view the image or add it to a post it doesn’t show up. I noticed files with the same nams as the sitename of the subdomain are redirect. In this case: sitename.network.com/.png instead of sitename.network.com/files/2010/04/sitename.png.

    There are no problems with images with other names then sitename.

    Is it possible there’s something wrong in the .htaccess file, or maybe there are wrong settings in the (network) admin? Or maybe somewhere else?

    The .htaccess file:

    # 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]
    <files wp-config.php>
    order allow,deny
    deny from all
    </files>
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    RewriteCond %{HTTP_REFERER} !^http://network.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://network.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://network.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://network.com$      [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
    RedirectMatch 301 /sitename(.*) http://sitename.network.com/$1
    Options -Indexes
  • The topic ‘No images when site name is in file name’ is closed to new replies.