The MU forums have moved to WordPress.org

Subdirectories doesn´t work on fresh mu installation (3 posts)

  1. tobbe_l
    Member
    Posted 15 years ago #

    Have a fresh installation on apache 2 and wordpress mu 2.6. I want to run blogs in subdirectories like: blog.xxx.nu/blog1. Admin works and I can create blogs and users but the url:s to the blog directories doesnt work.

    I´ve tried to follow the instructions for installation and have modified httpd.conf.

    I´m an apache newbie and have probably messed something upp. Here´s the virtual host part:

    <VirtualHost *:80>
    # ServerAdmin webmaster@dummy-host.example.com
    # DocumentRoot /www/docs/dummy-host.example.com
    # ServerName dummy-host.example.com
    ServerName blog.xxx.nu
    ServerAlias *.blog.xxx.nu
    # ErrorLog logs/dummy-host.example.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common
    </VirtualHost>

    Something wrong? Something missing. Please help me!

  2. dgilmour
    Member
    Posted 15 years ago #

    Have you got a .htaccess file in your WPMU top level directory that looks something like this?

    RewriteEngine On
    RewriteBase /

    # Rewrite http://www.domain.com to domain.com
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

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

  3. andrea_r
    Moderator
    Posted 15 years ago #

    If you want subDIRECTORIES, then you don't have to make the Apache edit for subDOMAINS. :)

    If the url's don't work, make sure mod_rewrite is enabled and the file override is too.

About this Topic

  • Started 15 years ago by tobbe_l
  • Latest reply from andrea_r