• Resolved wholmes

    (@wholmes)


    I have a multisite setup and the main blog urls are written as /blog.dir/#/files… and the images show up as expected. When I create a new blog to use as a template with New Blog Templates plugin the urls I get are written like this.. /sitename/files/…

    The files are being uploaded to the correct place spot /blog.dir/#/files but since the image urls show up in the front-end as /sitename/files/… I’m not seeing the images.

    More info: I’m running WP 3.1.2 and the main site is not rewriting the url it’s using blogs.dir/#/files… and that’s working for me. But the 2nd site and all templates based off of it are uploading the images but displaying the wrong url. When I edit the fileupload url manually the in the settings I still get the same /sitename/files/… which leads me to believe the urls are getting re-written somewhere in the process.

    Has anyone experienced this before? Is there a way to disable that front-end rewrite? just need some ideas.

    Also will testing on a local install affect these behaviors at all? I’m working locally to speed things up. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The rewrite is intention and what is supposed to happen. Don’t worry about that it’s doing it. WP takes ‘domain.com/site2/files/2011/05/22/file.jpg’ and translates that to the /wp-content/blogs.dir/2/files…. location.

    What’s your .htaccess look like, and are you using subfolder or subdomains install?

    And what’s your REAL URL? We may be able to show you.

    Thread Starter wholmes

    (@wholmes)

    Thanks a lot @ipstenu

    As mentioned it’s a local install.. so I don’t have a url to share but if it makes a difference I’m willing to setup a sub domain install.

    Here’s my htaccess…

    RewriteEngine On
    RewriteBase /multisite/
    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]

    Let me know if you think setting up the subdomain install on my server would help.

    Thanks again

    Is it doing the same with TewntyTen (or TwentyEleven?).

    Either way, still an htaccess issue. Might not have the file in the right spot or the local server just is not reading it all and is using the one from a folder at the next level up.

    Thread Starter wholmes

    (@wholmes)

    okay that’s a start… It’s a very new install so I can test on non-local install without too much trouble so I’m gonna try that and get back to you. I appreciate both of you.

    Thread Starter wholmes

    (@wholmes)

    Not sure why but moving the testing environment to a non-local install seems to have fixed the problem images on new sites are showing up now. My local server setup didn’t like my htaccess I guess… good call on that one. Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Upload url help’ is closed to new replies.