I need to find the best way to prevent mod_rewrite from renaming resources that are generated by a different module, specifically mod_pagespeed. This needs to be done from within mod_pagespeed, rather than asking the site admin to tweak his rule set.
By reading mod_rewrite.c, I found a mechanism that appears to work. But it has its own issues and I'm having trouble finding any relevant doc about the mechanism: ap_hook_translate_name(bypass_translators, APR_HOOK_FIRST -1); bypass_translators returns OK for resources generated by the module, preventing mod_rewrite from disturbing them. It returns DECLINED for other resources. The trouble is that httpd seems to report error messages in the log for the lack of a filename. We can set the request->filename to something but that causes the requests to fail completely on some servers. We haven't isolated the difference between servers that can handle the fake filename and ones that can't yet. Is there a better way to solve the original problem: preventing mod_rewrite from corrupting mod_pagespeed's resources? Or is there better doc on the semantics of the request.filename field in the context of a resource that is not stored as a file? Or on ap_hook_translate_name? sent from my android