Viewing 15 replies - 1 through 15 (of 63 total)
  • Thread Starter greene.md

    (@greenemd)

    I’ve installed another 3.0 network in a subfolder /dir on the same server. Images work in the sub-sites of that install. So it must be root folder related. Both the root (/www) and /dir folders have the exact same .htaccess file defined by 3.0 network install.

    I have AllowOverride All turned on, I’m really grasping at straws here. I think I’ve tried every solution I’ve seen on the Multisite forums thus far and it’s still not working. Any ideas anyone?

    Thread Starter greene.md

    (@greenemd)

    Now the sub-site I’ve been trying this in /rappenings won’t appear at all. But the admin interface still works, what it going on here? Now I’m completely confused.

    Thread Starter greene.md

    (@greenemd)

    Fixed the issue of the site not showing up. Theme error, images still not working though.

    Thread Starter greene.md

    (@greenemd)

    I just tried uploading a PDF and inserting that into a post. Worked fine, server redirected the link and the browser downloaded the file. So why won’t images work?

    have you try this..may be will help you.

    I modified my htaccess file and change the path as below..
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
    because previously it was with RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    and if you are using WPMU 3.0 blog.php is no longer in use, so far everything is working fine for me. did you check your htaccess as well as .htaccess

    Thread Starter greene.md

    (@greenemd)

    riddhishshah, thanks for the tip. Unfortunately I still can’t get uploaded images in sub-sites to show up. What do you mean by

    did you check your htaccess as well as .htaccess

    I’ve been checking my .htaccess file and it appears correct, I don’t have a htaccess file if that’s what you mean.

    your RewriteRule shows blog.php or mu-files.php in your htaccess file. Because blog.php is no longer in use if you are using 3.0 MU.

    Thread Starter greene.md

    (@greenemd)

    Here is my .htaccess file

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

    The first uploads rewrite rules is the original WP told me to use and the second is the one riddhishshah recommended. Since this was a fresh install I don’t believe I’ve ever used blogs.php in any of my .htaccess or http.conf rules.

    are you working on localhost? just checking you might done this but check Upload file types

    Thread Starter greene.md

    (@greenemd)

    It’s a Windows server 2008 machine that I remote into so no. I had originally set everything to localhost but when we tried to switch to a normal domain name I had a bunch of crazy errors so I scrapped everything and did a fresh install using the reconstruct.rappahannock.edu domain name. Everything has worked fine except this images in sub-sites issue.

    Thread Starter greene.md

    (@greenemd)

    jpg and jpeg are listed under upload file types

    Thread Starter greene.md

    (@greenemd)

    I’ve tried each of these Rewrite rules and none of them have worked.

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

    I’ve also tried switching the file=$2 to file=$1 on each of the rules as well. My background is in design so a lot of this is new and some still doesn’t make sense. Any other tricks you can think of to play around with?

    The .htaccess file won’t work with server 2008.
    You need to have the rewite module installed on the server Here

    You also need to configure the web.config file which is IIS’s version of .htaccess sort of. Mine looks like this. The 2nd rule helps with pretty permalinks.

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <defaultDocument>
                <files>
                    <clear />
                    <add value="index.php" />
                </files>
            </defaultDocument>
            <rewrite>
    		    <rules>
                    <rule name="Uploaded Files" stopProcessing="true">
                        <match url="^files/(.+)" />
                        <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="wp-includes/ms-files.php?file={R:1}" />
                    </rule>
    		        <rule name="Main Rule" stopProcessing="true">
    		            <match url=".*" />
    		            <conditions logicalGrouping="MatchAll">
    		                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    		                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    		            </conditions>
    		            <action type="Rewrite" url="index.php" />
    		        </rule>
    		    </rules>
    		</rewrite>
        </system.webServer>
    </configuration>

    Hope this helps

    Thread Starter greene.md

    (@greenemd)

    enjaytee, I am using Apache not IIS on Windows Server. Sorry, I should have mentioned that in my previous post. Thank you though.

    Thread Starter greene.md

    (@greenemd)

    I’m trying to experiment with a specific Rewrite Rule just to see if I can get an image url to rewrite at all. Does anyone know how to write a rule to take
    http://reconstruct.rappahannock.edu/wp-content/blogs.dir/25/files/2010/06/Photo-3-copy.jpg and rewrite it to http://reconstruct.rappahannock.edu/rappenings/files/2010/06/Photo-3-copy.jpg

    I tried using ReWriteRule ^files/2010/06/Photo-3-copy.jpg wp-content/blogs.dir/25/files/2010/06/Photo-3-copy.jpg but that didn’t work.

Viewing 15 replies - 1 through 15 (of 63 total)
  • The topic ‘New 3.0 install, images not working in subsites’ is closed to new replies.