Rewriterule questions


I am attempting to redirect requests to my domain name, to the subdirectory /site. I am doing this so that I can use WebDAV to manage my site files. Still, I want to be able to have other directories directly off of the directory, such as

Is there a way I have all requests made to redirected to /site but maintain /blog in it’s current location? That is to say, I don’t want to have to move /blog to in order for it to remain accessible with the redirect in place.


RewriteBase /
RewriteCond %{REQUEST_URI} !^/site
RewriteCond %{REQUEST_URI} !^/blog
RewriteRule (.*) /site/$1 [R]

See the documentation for an explanation: URL Rewriting Engine

:cool: Perl / MySQL / HTML+CSS


What about just redirecting the pages like so:
(Place the following in a .htaccess file)
Redirect permanent index.html



Thank you, that worked like a charm for most of my directories–with one exception.

I have a another WebDAV enabled directory, /dropbox, exisiting at the same level as the others. This directory was password protected (for read) and loading it would bring up a password prompt.

With the rewrite functioning firefox simply says “Firefox has detected that the server is redirecting the request for this address in a way that will never complete.” I can still access the directory as a web folder, and if I turn off the “password protect this directory” option in DH control panel I am able to access/read the directory with no problems.

Is there any way to preserve the password protection with a rewrite in place?


Add a RewriteCond for /dropbox

:cool: Perl / MySQL / HTML+CSS