[wp-hackers] So, this whole .htaccess thing...

Ryan Boren ryan at boren.nu
Sat Aug 26 06:45:09 GMT 2006


Charles wrote:
>>> Does WordPress really need a dependency on .htaccess?  Couldn't 
>>> functionality that currently requires it be done with a router
>>> that handles all requests and returns the proper view(s)?
>>   
>> How would this "router" work and how would it be more compatible
>> than mod_rewrite?
> 
> I'm thinking of something like Zend Controller Rewrite Router, part of the
> nascent Zend Framework.
> <http://framework.zend.com/manual/en/zend.controller.rewriterouter.html>

That's very similar to what we already do. Note that rewriterouter has a 
dependency on mod_rewrite as well.  It requires the same bootstrap lines 
in htaccess that are required by WP, Textpattern, and every other bit of 
software that does it's own rewriting.

> To me, the dependence on .htaccess seems like one of the more fragile parts
> of the system.  I had to modify several lines just to put WordPress in
> site.com/wp instead of site.com/wordpress, I had to add a few more lines to
> support FeedBurner, and I've had to add a few hundred lines to to support
> permalink changes.  It seems like losing the dependence on .htaccess would
> make it easier to run WordPress on non-Apache servers, would allow a new
> class of "router" plug-ins to be created, etc.

There are plenty of router plugins for WP.  With the proper plugins, 
there is no need to touch htaccess.

And as already noted, WP can rewrite from PATH_INFO or from a 404 handler.

Ryan



More information about the wp-hackers mailing list