The MU forums have moved to WordPress.org

404 on posts and images (htaccess again) (8 posts)

  1. Ustice
    Member
    Posted 16 years ago #

    I realize that there are a number of similar posts for this issue, but I have tried using them, and I am still having the issue.

    I have set up WPMU 1.2.1 to run in sub-domain mode (folder mode did not work at all). I am able to create blogs, see blogs, admin blogs, create posts, and upload files, but I can not see the individual posts (when not on the main blog page), and I can not load images.

    When trying to load the posts or images, I get the following:
    __________________________________

    Not Found
    The requested URL /wordpress-mu/files/2007/06/istock_000002308057small-copy-3.jpg was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.33 Server at media.beta.luctor.com Port 80
    __________________________________

    I realize that this is a .htaccess file problem, as when I change a link to an image from:

    http://media.beta.luctor.com/wordpress-mu/files/2007/06/istock_000002308057small-copy-3.jpg

    to:

    http://media.beta.luctor.com/wordpress-mu/wp-content/blogs.php?file=/2007/06/istock_000002308057small-copy-3.jpg

    the image loads.

    Here is my .htaccess file:
    __________________________________

    RewriteEngine On
    RewriteBase /wordpress-mu/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    __________________________________

    I have verified that I have the rewrite module activated.

  2. drmike
    Member
    Posted 16 years ago #

    Actually it looks like you installed the files into the subdirectory /wordpress-mu/ and are trying to do subdomains off of that. That doesn't work. The files need to go into root of the domain that you're going to do subdomains off of.

  3. Ustice
    Member
    Posted 16 years ago #

    That explains a lot. I guess I am off to create a sub-domain for it then. Thanks. I will reply with the results.

  4. andrea_r
    Moderator
    Posted 16 years ago #

    Nononononono... you do not need to create any subdomains for it.
    Drmkie said install it in the ROOT. Just do that and have wildcard subdomains enabled as per the readme.txt file.

  5. Ustice
    Member
    Posted 16 years ago #

    Okay, I have reinstalled WPMU, using a direct subdoamin. I am getting the same problem now though. :(

    http://test.wpmu.luctor.com/files/2007/06/applevodka-bottle.JPG

    fails, though the file is there.

    http://test.wpmu.luctor.com/wp-content/blogs.php?file=/2007/06/applevodka-bottle.JPG

    works.

    My .htaccess files is as follows:

    ______________________________

    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    ___________________________________

  6. Ustice
    Member
    Posted 16 years ago #

    andrea_r,

    I created a new subdomain, and installed it at the root of that domain. It now lives on wpmu.luctor.com. The blogs now go directely to BLOG_NAME.wpmu.luctor.com. Wildcards are enabled for *.wpmu.luctor.com.

    (Thank you both for your assistance.)

  7. Ustice
    Member
    Posted 16 years ago #

    Okay, I was able to fix the issue. On a Mac 10.4.9 Server you need to alter the right .conf file located in the /etc/httpd/sites directory. In there you add the

    AllowOverride FileInfo Indexes Options

    line to the <Directory> section. Once you do that, everything works.

    So if anyone else is installing WPMU on a Mac server, you now don't have to spend a day trying to find what the issue is (assuming that you can find this post, that is).

    Thanks again to everyone for your help!

  8. lzeligl
    Member
    Posted 16 years ago #

    Ustice, thanks for posting that fix. Worked like a charm.

    My file location and name differed slightly (I'm using Apache on CentOS: /etc/httpd/conf/httpd.conf

    Do a search for AllowOveride and edit it so it looks the following:

    <Directory />
    Options FollowSymLinks
    AllowOverride FileInfo Indexes Options
    </Directory>

About this Topic