Redirect Root Directory


#1

Greetings!

I’m trying to put together an htaccess that will redirect the root directory to a subdirectory — user/domain/current/wordpress, wherein domain is the domain root.

I found this link by Dreamhost: http://wiki.dreamhost.com/Transparently_redirect_your_root_directory_to_a_subdirectory

Unfortunately, I couldn’t get it to work. I just got a server error (I’m sorry, I can’t remember which error). I found another htaccess online, however, that did (almost) what I was looking for:

RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com$ [NC,OR] RewriteCond %{HTTP_HOST} ^www.example.com$ RewriteCond %{REQUEST_URI} !current/wordpress/ RewriteRule (.*) /current/wordpress/$1 [L]

The only place that this breaks down is upon internal redirecting. If, for example, I go to example.com/wp-admin, it redirects me to: http://example.com/wp-login.php?redirect_to=http%3A%2F%2Fexample.com%2Fcurrent%2Fwordpress%2Fwp-admin%2F&reauth=1

Locally, I don’t have this issue; only on the server. The truth is, I am completely in the dark what the htaccess commands mean. Any help on this would this would be greatly appreciated!

~Jason