Help with .htaccess file needed


Hello all,

Dreamhost support suggested that I check with the forums for some help on my .htaccess file issue.

I have a WordPress MU install that is all setup, but the .htaccess is keeping me from accessing the admin panel. I guess that I’ve got some rewrite that is not allowing me to get to it.

What would I need to do to get this working properly? Here is the file’s contents…

[quote]RewriteEngine On
RewriteBase /blogs/

#uploaded files
RewriteRule ^(./)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.wp-content/plugins.
RewriteRule ^(.
/)?files/(.*) wp-content/blogs.php?file=$2 [L]

add a trailing slash to /wp-admin

RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,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]

SecFilterEngine Off SecFilterScanPOST Off [/quote]


And what happens instead of accessing the admin panel? Do you get an error message in the server logs? Have you tried changing the rewrites to redirects to see what URL is being used?

Customer since 2000 :cool:


The install went through with no problem, but when I went to log into the admin panel for the first time it wouldn’t log me in. Just let me see the screen, enter the info and click login. But, didn’t move. After a couple of attempts, I asked DreamHost for some assistance and that’s when I was told that something in the .htaccess was not allowing me to go into the site. Once we disabled the .htaccess, it allowed us to login and see the admin panel and the site.

Any advice?

PS. I’m not even sure where to go in the server logs (or how to get to them, for that matter) since I’m a newbie at all of this.


The server logs are kept in your home directory at ~/logs/[your domain]/http and access.log stores web site hits and error.log stores error messages. It’s a good idea to make copies of these files if you are in to tracking stats, troubleshooting being hacked, etc because DH only keeps them for a few days.

You probably won’t have an error message though, “doesn’t move” sounds like you are being redirected back to the login panel. Also its hard to debug rewrite rules unless you have a list of URLs that you want to rewrite.

I’m assuming you install WPMU so that blogs will be subdirectories, right?

Edit: I’ve tried this myself, installing WPMU to hand blogs on subdirectories instead of subdomains. It install OK and I could login in as the admin first time. Did you install to the document root or to a subdirectory?

Customer since 2000 :cool: