[resolved] Subdomain blogs uploads images correctly, but path written incorrectly (4 posts)

  1. w3bgrl
    Posted 3 years ago #

    When I upload images to the main site media gallery, it uploads and writes the path correct, but all subdomain blogs, upload to their correct wp-content/blogs.dir/#/files/date/ directory, but the subdomain name, doesn't point to root/wp-content/blogs.dir/ - it seems to just put subdomain.root.com/files/date/ instead of rewriting correctly, which when you link it, takes you to a 404

    Image upload written path:
    Where the image appears it should be (but it is showing in cPanel File Manager in public_html):

    I am on Hostgator, and my wildcard is set up correctly, I am 99% sure it's the htaccess file, but can't figure out how to fix it.

    # BEGIN WPSuperCache
    # END WPSuperCache

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]


    # END WordPress

    Thank you!

  2. w3bgrl
    Posted 3 years ago #

    Fixed! Hostgator support staff had an extra htaccess example file and replaced it. I was missing the wp-admin calls.

    If anyone else has this issue, this is what they gave me:

    RewriteEngine On
    RewriteBase /
    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).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    HTH someone else!

  3. w3bgrl
    Posted 3 years ago #

    Forgot to mark as resolved...

  4. nacame
    Posted 3 years ago #

    Solved the problem for me (after 36hrs of navigating and reading other stuff)

    Thank you so much.

Topic Closed

This topic has been closed to new replies.

About this Topic