It _could_ be done with uglier URLs and some hackery in the code:
With mod_rewrite:
http://blog.example.com/path/to/habari/foo-bar
Could become without mod_rewrite:
http://blog.example.com/path/to/habari/index.php/foo-bar
S
What follows is entirely my own opinion and my reaction based on that
opinion.
Hosts that supply mod_rewrite are no more expensive than hosts that
don't -- it's generally not a feature that you pay more for.
Habari relies heavily on the front controller pattern that is most
reliably implemented on Apache (at the moment) using mod_rewrite for
implementation.
We typically require hosts that have features enabled that others might
not, such as PHP5 and PDO. I would not expect to see a case where those
features are enabled but mod_rewrite is not.
Providing an additional method to implement rewrites in Habari sounds
nice, but added features also incur added development costs. These
additional features, however unlikely, could also introduce security
concerns, which are especially tricky given that all of the core
developers I am aware of use mod_rewrite and are unlikely to use an
alternative rewrite mechanism in wide testing.
Given the ubiquity of mod_rewrite at hosts that offer it for no
additional cost, and the added maintenance for alternatives to this
primary and well-established method of implementing a Front Controller
Pattern in Apache, I'm personally inclined to ignore most speculation
about it unless I see someone contribute superior quality, complete,
security-hardened code that implements it.
Unless the email that introduces it offers it in such a way that it's
extremely compelling to pursue, I'm afraid I just don't have the
personal inclination to do anything about it. I suppose that someone
could provide a compelling argument for anything, but I would be
surprised if one existed for this.
Owen
Adding hooks that are not exclusively useful for enabling
non-mod_rewrite URLs is a much more compelling development task.
Owen
On 15 Jun 2009, at 11:15, eighty4 wrote:
> It should be noted that Habari does work without mod_rewrite.
> There's simple solutions for it for both Nginx and Lighttp on the
> wiki.
I think the OP meant without any rewrite solution in the webserver,
rather than just using nginx or lighttpd's rewrite functionality to
use habari. :)
C
- ---
Caius Durling
ca...@caius.name
+44 (0) 7960 268 100
http://caius.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAko2IIQACgkQlj5WkEOM/Ni9+gCgzf5+MAioz0EMpSyd4/2V9jIC
S34AoIHwsPjAsruItHmtH4w7HRSO0LS9
=nuUZ
-----END PGP SIGNATURE-----
On 15 Jun 2009, at 14:47, Realpolitik wrote:
> This will not make/break Habari's future, but it is something that
> helps determine the extent of it's future influence, and considering
> it wouldn't take very long to implement, is something that should be
> given more consideration than it currently is. Lets pretend a very
> generous 75% of Habari's potential user base has the ability to
> rewrite URLs, it could have 33% more reach.
How many PHP 4 hosts are there out there still? Should we support them
too because it'll let more people use habari?
Not trying to be awkward intentionally, but we've got to draw the line
somewhere, and mod_rewrite seems like a valid requirement to me. I
don't think I've ever had a host where I either didn't have it, or
couldn't get it enabled. And most of those I have experience with were
cheap £20-50/year hosts, when you get power users that build their own
webservers it becomes a non-issue too.
And you've always got the chicken and egg problem don't forget, if
more software that the average user will use requires something that's
basically a non-issue for a host to provide, then more hosts will
provide that something out the box (or give you the option to ask for
it.)
C
- ---
Caius Durling
ca...@caius.name
+44 (0) 7960 268 100
http://caius.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAko2UpoACgkQlj5WkEOM/NjPMQCfUYfn9yajnfxfsPs6xGSsyD7J
EcQAoMPfrTRQ8Ta7wkGhBvjXI/A0YVgy
=rH6h
-----END PGP SIGNATURE-----
> Lets pretend a very
> generous 75% of Habari's potential user base has the ability to
> rewrite URLs, it could have 33% more reach.
I love making decisions based on made-up statistics. It's one of the
things I love so much about my day job.</sarcasm>
On my side of the fence, I'm fighting this battle with education. The
only reason that folks *don't* have mod_rewrite enabled is ignorance,
in which vacuum folks made up security myths and pretend that they're
doing it for reasons of security and/or performance.
If you have sysadmins who refuse to enable mod_rewrite for reasons
that seem spurious, please feel free to give them my phone number. I'd
be glad to talk with them about their concerns, and help them
eliminate those concerns.
In this age, mod_rewrite is an essential part of the Apache Web
Server, and folks that have it disabled are crippling their customers.
This is a pretty simple business decision. Enable mod_rewrite, or
folks will eventually move to a provider that will. Unfortunately,
there's an ENORMOUS amount of misinformation out there about
mod_rewrite, and a lot of ignorant people pushing "tips and tricks"
that are misleading or just plain wrong. On the Apache documentation
project, we've been actively fighting this for about three years. And
some of the improvements in Apache 2.4 make entire classes of rewrite
rules unnecessary.
And I'm still holding on to the hope that https://issues.apache.org/bugzilla/show_bug.cgi?id=47184
will get implemented, and this issue will go away - at least for
folks that move to Apache 2.4.
--
Whatever you do will be insignificant, but it is very important that
you do it.
Mahatma Ghandi
Perhaps. But while an underlying goal of Habari may be to extend its
reach, it's not at the expense of introducing legacy/throwback
technology. We specified PHP5 early on for that reason, and at the time
that was seen as a detriment to Habari's reach also.
I suspect that the GoPHP5 initiative, where developers simply cut off
their own support of PHP4, had a lot to do with PHP5 acceptance across
hosts. I would prefer to be driving change, rather than holding onto
legacy for the sake of bigger installation counts.
I can think of no practical reason - not reach-related - to avoid
requiring mod_rewrite.
Owen
This is totally irrelevant unless we have core developers who use,
develop, maintain and deploy Habari in non-mod_rewrite environments
and who are willing to do the work to stay on top of this.
This is precisely why PHP has traditionally had poor support for
Windows and why the shared hosting implementations haven't been so
good: the core developers care more about big systems running some
flavour of unix.
S
> I am not against the inclusion of hooks that would allow for non
> rewrite operation
To be clear, neither am I.
We'd just need someone who actually cares about such things to
maintain the plugins that use those hooks...
(and I shamefully haven't even updated my own plugins to the new API
yet)
S
That's because it's not about what would be required to support the
feature, but the philosophical choice of developing only certain avenues
explicitly to avoid the cost of others.
There were many contributing factors to the choice, but the reason we
did not include PHP4 support in Habari was not primarily because it
would required many man-hours of development to include in addition to
PHP5. We did not include PHP4 support because we wanted to be more on
the forefront of development, and excluding the technology we didn't
want allowed us to focus more on what we did want.
mod_rewrite is not legacy, but in the similar vein that PHP4 does not
support OOP well, non-mod_rewrite servers do not support the front
controller pattern that we preferred. So rather than developing with
the intent to support code we didn't want and would never use, we chose
to rely on rewritten URLs.
It's not a matter of comparative simplicity in development. It's a
choice to have the core do something only one way, the way we wanted, well.
I'm belaboring this discussion not because I particularly care about
mod_rewrite, but I think that understanding the motives of early-on
Habari development decisions is generally important for figuring out
what features and direction Habari takes in the future.
>
> Excluding a plugin that would allow people to create mod_rewriteless
> functionality for Habari is not championing a cause, and you will
> affect nothing by it except a loss in users.
The only person suggesting the exclusion of such plugins is you. Please
review the thread, where even I said that including the hooks would be fine.
The problem you face is that I doubt any core developers will care to
write this code for you. And since none that I know of use
non-rewritten URLs, it may also be difficult for them to test submitted
patches. Nonetheless, there are already core devs replying to the
thread that are supportive of a patch, including myself, especially if
the hooks are useful for more than just avoiding mod_rewrite.
The energy put into this thread long ago exceeded writing the actual
code to implement its ideas.
Owen