Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)?

share|improve this question
This question should be migrated to stackoverflow – Amit Gupta Nov 24 '11 at 13:09

Does your client accesses page through browser? If so in every directory you can put a php file which can show 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 referal URL.

share|improve this answer
no, "a client connects to my WebDAV server" using a WebDAV client - in this case dav2fs – Jack Douglas Nov 24 '11 at 15:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.