3

I have the following directories on my Apache server:

root/dir1/
root/dir2/
root/dir3/...

Is it possible to make the contents of my sub-directories (dir1, dir2, dir3) "as if" it was directly in root/?

I'm looking for a solution for dynamically created directories.

2 Answers 2

0

Create a program or script in root that handles all requests (like a 404 ErrorDocument) by analyzing the URL and searching for matching files in those directories.

Since you need to think about e.g. priorities when theres dir1/filename.ext and dir2/filename.ext this is the most flexible solution.

0

You might be able to do some of this with RewriteRules if the directory and file names follow a pattern.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .