Closed malkusch closed 10 years ago
Hi Markus. Do you have link to a resource where Apache encourages the use of FallbackResource
instead of a RewriteRule
?
http://httpd.apache.org/docs/trunk/rewrite/remapping.html#fallback-resource
As of version 2.2.16, you should use the FallbackResource directive for this
Neat tip, but I’m not comfortable with lowering the barrier of entry for users of ToroPHP by providing documentation that excludes users of older versions of Apache. Thoughts, @anandkunal?
This feature is 4 years old. There exists no maintained version which doesn't support that feature. Apache is not that kind of software you want to run a unmaintained version. Anyways… your decision.
If that’s the case and Apache >= 2.2.16 is in widespread use, then happy to mention it in documentation.
As I say, neat feature and I’ll look to use it myself in any Apache-hosted PHP apps (I work a lot with nginx these days), so thanks for bringing it to my attention!
There exists a large userbase of older Apache installations - all CentOS 6 machines are running Apache/2.2.15
[root@s3 ~]# httpd -v
Server version: Apache/2.2.15 (Unix)
CentOS 6 and its commercial brother Red Hat Enterprise Linux are well-maintained and have over 30% market share amongst UNIX OS'es. http://w3techs.com/technologies/details/os-linux/all/all
Apache actually errors out with an Internal Server Error when you use the FallbackResource.
I vote to revert the documentation change, since I think a large portion of web hosts can't use this. (Certainly not any vanilla CentOS or Red Hat installations.)
This was exactly my hesitancy for merging this pull request. I’ll revert back at my earliest convenience, unless someone gets there before me.
Thanks Martin.
I think the FallBack directive is actually excellent and elegant, and should be part of the documentation. But it should be alongside with the older, more supported method.
CentOS 6 and its commercial brother Red Hat Enterprise Linux are well-maintained
Regarding that mentioned market share. I really hope "well-maintained" means they distribute a patched 2.2.15 version with those 2.2.x upstream patches: http://httpd.apache.org/security/vulnerabilities_22.html
I just found that one: http://w3techs.com/technologies/details/ws-apache/2.2/all It shows sadly that 2.2.15 is about the median of all used 2.2 version. So, yes I agree keep that RewriteRule. I'd suggest to mention that FallbackResource as well for people with a more recent apache.
Apache encourages the use of FallbackResource instead of a rewrite rule.