Ruleset Precedence - Before or After Transformation
Lewis De Payne
18 October 2015, 19:28
With regard to FastCGI processing of PHP, is it possible to do the following in hiawatha:
1) Have the Match rule (in UrlToolKit) be directory-specific, so that certain directory hierarchies for the same website are processed by PHP, while others are processed by the normal HTML handler. For example: x.com/plain/page.html is processed as normal html, while x.com/that/page.html is sent to PHP?
2) Apply certain rewrite rules and have the result (the transformed path) be picked up by the correct parser (which means the FastCGIserver block must have precedence over UrlToolKit). For example: Assume a rewrite rule transforms this: x.com/before/do.html into this: x.com/after/do.php - will the FastCGIserver block process it before or after the transform (will it be picked up as .php and fed to the FastCGI)?
If not, assume all pages are presented to the client as .html and that we do not want to invoke the PHP FastCGI for each page. Is there a way of internally marking which pages should be sent to PHP FastCGI? Even a directory-based (where it's all or nothing within that directory) method would be fine.
I am eager to implement your product. Thank you for what you've done, so far.
Hugo Leisink
18 October 2015, 20:10
1) You can force the usage of a FastCGI handler via the UrlToolkit.
Match <pattern> UseFastCGI <fcgi_id>
2) This is already the case. Hiawatha will determine how to handle the requested file after it applied the right UrlToolkit rules.