Feature #348
closedEnhance mod_rewrite with some of the apache mod_rewrite features
Description
It would be really nice if there was a way to have a mod_rewrite rule that only matched if a condition was met like !-f in the apache mod_rewrite's RewriteCond directive. Its needed to impliment page caching where if a static file doesn't exist, mod_rewrite sends the request to a dynamic page which creates the static version for future requests.
Updated by jan about 19 years ago
- Status changed from New to Fixed
- Resolution set to invalid
server.error-handler-404 = "/fastcgi.app" does all you need for this already.
If the file doesn't exist it will result in a 404 which can be catched and internally redirected to a handler (here "/fastcgi.app").
Updated by Anonymous almost 19 years ago
I agree with anonymous here, conditional rewrites are more flexible, since you can rewrite any number of missing files to any number of handlers, ie
"^viewtopic/.+$" => "viewtopic.php?$1"
"^news/.+$" => "news.php?$1"
et cetera. This allows for flexible caching without the use of mod_cml
-- black
Updated by Anonymous almost 19 years ago
Related to / has duplicate of #413.
-- ryandesign
Updated by Anonymous almost 19 years ago
Or, older still, duplicate of #237.
-- ryandesign
Updated by jan about 18 years ago
- Status changed from Need Feedback to Fixed
- Resolution set to duplicate
Also available in: Atom