The MU forums have moved to WordPress.org

htaccess and using mu within domain.com/blogs/ (9 posts)

  1. picto
    Member
    Posted 17 years ago #

    Hi,

    I've been reading all the comments I can about this problem but still can't seem to have it figured out. I am trying to install MU on two machines in a similar manner :
    domain.com/blogs/

    Both machines cannot run mu and have the same problem of bad requests. both are running apache 1.3.33 and php 5 and mysql 5

    but none of the htaccess rules fire to handle the blogs, the main blog works but any other file doesn't get called.
    my rewrite logs show the names being passed through : "pass through /blogs/tretee/"
    my .htaccess looks like :

    AcceptPathInfo On
    AllowOverride FileInfo Options
    RewriteEngine On
    RewriteBase /blogs/

    #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]

    My user.conf looks like :
    Alias "/blogs" "/Users/picto/Sites/blogs"
    <Directory "/blogs">
    RewriteEngine on
    Options FollowSymLinks
    AllowOverride FileInfo Options
    Order allow,deny
    Allow from all
    </Directory>

    thank you for any help.

    NB-1 :lyceum seem to have the same problem as they have the same .htaccess file

    NB-2: is there any reason those files are not called as is wp-login and wp-... ?

  2. drmike
    Member
    Posted 17 years ago #

    Please check to see if your box has mod_rewrite turned on and assigned to this account. It may not be.

  3. jutecht12
    Member
    Posted 17 years ago #

    I think I'm having the same issue. I'm migrating a site, but non of the blogs are being called. I have the same .htaccess as above with no success. Any help would be appreciated.

    http://students.saschinaonline.org

  4. drmike
    Member
    Posted 17 years ago #

    Any help would be appreciated.

    *sigh*

    I think I mention mod_rewrite in the post directly above yours. Can't help you if you're not willing to help yourself.

    Also please check your webserver's error logs and the error_log file within WPMu's root.

    edit: Not sure why you put a students link in your post. It doesn't work.

  5. jutecht12
    Member
    Posted 17 years ago #

    drmike

    rackspace check the mod_rewrite for me and told me that it was turned on. I'll call them today to double check it.

    I put the student link in the post as an example.

  6. jutecht12
    Member
    Posted 17 years ago #

    Solved my problem with the blogs. The following needed to be changed on the Apache server.

    the apache configuration was modified from this:
    --
    <Directory "/var/www/vhosts/saschinaonline/blogs">
    allow from all
    Options +Indexes
    </Directory>

    to this:
    --
    <Directory "/var/www/vhosts/saschinaonline/blogs">
    AllowOverride FileInfo Options
    </Directory>
    ---

    Hope this helps others. This was on a rackspace Linux server.

  7. picto
    Member
    Posted 17 years ago #

    I've made some progress but nothing in the directory settings helped as I had AllowOverride All.

    my .htaccess files looks like this now :

    # BEGIN WordPress works half way
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /~joe/blogs/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /~joe/blogs/index.php [L]
    </IfModule>
    AddType text/css .css
    # END WordPress

    everything seems to work I haven't tried uploading yet, BUT!!!! I cannot get any CSS working as the user dir is not created or caught by the index.php so my users' posts are without images or CSS. Te logout page is also a 404. I've tried to have the giant rewriterules files but it doesn't work.

    What can I do ?

  8. picto
    Member
    Posted 17 years ago #

    is there something that is missing ? why is wordpress MU so dependent on rewrite rules ?

  9. picto
    Member
    Posted 17 years ago #

    Fixed!! The rewrites rules were not firing properly especially the line which was responsible to catch themes and the logout page. so here is my new .htaccess file :

    RewriteEngine On
    RewriteBase /blogs/

    #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]
    #offending line follows it did not see the proper rewrite base!! added [a-zA-Z] !! and the /~joe/blogs
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-[a-zA-Z].*) /~joe/blogs/$2 [L]

    #end offending line
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    #other addition to rule base hard linked /~joe/blogs
    RewriteRule . /~joe/blogs/index.php [L]

    for an install that is under /blogs remove the /~joe and it should work fine!

    My best to all others in the same situation.

About this Topic