View Single Post
Old 12-09-2012, 06:16 PM   PM User | #8
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Code:
- url: /dir_2/subdir_a
  script: yourscript.py
# or perhaps
Code:
- url: /dir_2/subdir_a/.*
  script: yourscript.py
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.
Code:
error_handlers:
- 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

Added 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.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 12-09-2012 at 06:27 PM..
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
Mayankode (12-10-2012)