I can use mod_rewrite to redirect /dynamic.php/xyz.php to /dynamic.php and then server different content for xyz.php using $_SERVER - where xyz.php is any arbitrary filename requested by a client. No problem so far.

When a client connects to my WebDAV server they can list the contents of a directory, eg / or /dynamic.php/ - how do I intercept this request so I can dynamically generate a list of available files for the client (which requests this list using PROPFIND)?

  • This question should be migrated to stackoverflow Nov 24 '11 at 13:09

Does your client accesses page through a browser? If so, in every directory you can put a PHP file which would show a list of files as per your rules.

Another approach

You can redirect user to a specific PHP file where you can show lists as per your rules by comparing referral URL.

  • no, "a client connects to my WebDAV server" using a WebDAV client - in this case dav2fs
    – user11478
    Nov 24 '11 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy