Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter robertncook

    (@robertncook)

    As godaddy has posted, using manually-created subdomains technically works: I’m doing it. But, I’m still having this problem where the file system won’t redirect. Our media files upload to the appropriate folders, but wordpress won’t read from them.
    My htaccess file is, according to everything I’ve researched (and a reinstall), correct.
    Dedicated IP might do the trick, but it’s just not an option right now.

    My original question stands: is there a way to instruct wordpress to use specific directories for content instead of the auto-redirect?

    Quick edit for the sake of clarification and searches:
    My only problem is uploads.
    I found the code referencing uploading to blogs.dir in the ms-default-constants.php:

    function ms_upload_constants(  ) {
    	global $wpdb;
    
    	/** @since 3.0.0 */
    	// Base uploads dir relative to ABSPATH
    	if ( !defined( 'UPLOADBLOGSDIR' ) )
    		define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' );
    
    	/** @since 3.0.0 */
    	if ( !defined( 'UPLOADS' ) ) {
    		// Uploads dir relative to ABSPATH
    		define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
    		if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR )
    			define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );
    	}
    }

    I wish it were as simple as instructing it to simply upload to /blogs.dir/{$wpdb->blogid}/, but it’s that blogid reference that seems to be the root of my problems: wordpress uploads an image to http://www.domain.net/wp-content/blogs.dir/blogid/files/target.png, but my browser continues to search for sub.domain.net/files/target.png.

    As instructed by wordpress, my .htaccess file reads:

    RewriteEngine On
    RewriteBase /
    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]
Viewing 1 replies (of 1 total)