- url: /dir_2/subdir_a
# or perhaps
- url: /dir_2/subdir_a/.*
would redirect (as I understand..) requests to this subfolder to a Python script named yourscript.py, which you would need to create. Reference
I'm looking at.
- file: default_error.html
.. would redirect any 404 (or other) errors to the page default_error.html. You might redirect to a .py or .php (but I assume Python is your server-side language?). The page that is redirected to could contain a script to provide different content according to the page requested.
But this is the extent of my understanding.. and I may be wrong
If you are looking to exclude a folder then 007julien has provided an example using a negative lookahead assertion
. That is to say, "does not have this text". I do not know either, whether such a construct is acceptable within your configuration file.