I have a WebDav virtual host on a Debian Lenny server. I have it setup so that when a user logs in using htpasswd, mod-rewrite rewrites the default webroot folder so that the user is put into their webroot folder and they see that as / in their URI. The code for this in the apache conf file is:
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} !^admin
RewriteRule ^/(.*) /%{LA-U:REMOTE_USER}/$1
Within their webroot folder is another subfolder called "share" where they would place files to share with other users who are subject to the same login - rewrite rule. The actual share folder that all users should be able to access sits at the same level as the user's webroot folders, so it isn't within their webroot path.
What I want to do is, when the user opens their "share" folder within their individual root directories, I want it to rewrite them to the global "share" folder that technically sits outside their webroot.
So far, I've tried:
Symlinking the share folder within the user's webroot to the global share folder, but WebDav doesn't follow symlinks even when I set the FollowSymlinks option on the folder.
Created an alias in the apache config and added [pt] to the rewrite rule above so that the alias points to the global share folder. This shows me a new folder in the webdav client window for the alias but any attempt to write to that folder fails with a permissions error. The global folder is set to 777 for the time being so it's fully readable and writeable.
Does anybody know if this is doable? I know it seems I can do more if I don't throw webdav into the mix, but I need this to work with webdav.
Thanks