WordPress MU .htaccess file

April 20th, 2007

Here’s the correct .htaccess for a subdomain type of installation for WordPress MU version 1.1.1. Please double check your .htaccess for correctness. This file needs to be on the base level of your WordPress MU install. Here’s the code:

RewriteEngine On
RewriteBase /

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

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

Tags: ,
Categories: General

3 Responses to: WordPress MU .htaccess file

  1. Michael E-O says:

    Is this applicable to WPMU v1.5.1?

    I’ve tried this along with your instructions here:

    http://ulyssesonline.com/2007/04/20/wordpress-mu-dns-wildcards/

    but no results…

  2. ulyssesr says:

    Michael, I’m now running the latest WordPress-Mu version 1.5.1. It’s the same .htaccess file since I first installed it with version 1.1.1. So, I gather it works the same.

  3. anfesof says:

    Hi!

    I´m running WP-MU -2.6.5 and it works for me but only in the domain, when I create a blog it won´t show.

Comments are closed.