views:

547

answers:

1

I have enabled the lighttpd mod_webdav module and set up a webdav mount point of http://website.com/webdav using the following lighttpd.conf entry:

$["remoteip"] == "www.website.com" {
    alias.url += (
       "/webdav" => "/var/www/htdocs/webdav",
    )
    $HTTP["url"] =~ "^webdav($|/)" {
        dir-listing.activate = "enable"
        webdav.activate = "enable"
        webdav.is-readonly = "disable"
        auth.backend = "htpasswd"
        auth.backend.htpasswd.userfile = "/var/www/htdocs/passwd.dav"
        auth.require = ("" => "method" => "basic",
             "realm" => "webdav",
             "require" => "valid-user" ) )
    }
}

This gives the same directory for all webdav users.

However, I would like to make http://website.com/webdav redirect to a particular subdirectory based on the webdav user name.

For example:

  1. user logs in as user1, he/she sees htdocs/webdav/user1 when going to http://website.com/webdav or

  2. user logs in as user2, he/she sees htdocs/webdav/user2 when going to http://website.com/webdav

Can this be done?

Thanks

A: 

Even though HTTP and WebDAV allows it, popular clients don't actually follow redirects. The result is that clients such as the windows client, os/x client can't connect to the url directly..

Evert