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

Jamie Holly hovercrafter at earthlink.net
Sun Aug 27 00:23:34 GMT 2006


> > > (3) Plugins don't have to :)
> >
> > Why do they, then?  (Example: WP FeedBurner)

> Ask the author. Also a possible lack of proper documentation (also
> something I may have to volunteer to do).

It could also be pre WP2.0+ plugins (before the rewrite was redone). I have
notched some out there that work on 2.0, but use the old 1.5 .htaccess
hacks. That is nothing really up to WP to take care of. The plugin author
should decide when/if to modify to 2.0.

As far as putting a "router" in the mix, why? To me that is adding one more
bend in the pipe before the final outcome is produced. You can do a simple
hook into the rewrite array via a plugin to add urls, or rewrite feed urls
from other platforms. Simple script to handle Userland style feeds:

<?
add_filter("rewrite_rules_array", AddUserlandFeed(),1);

function AddUserlandFeed ($rewrite) {
	$new_rules['rss.xml']= 'index.php&feed=rss2';
	return ( $rewrite + $new_rules );
}
?>

Activate plugin then update permalinks and you're done. You can now access
your feed via http://yourdomain.com/rss.xml It isn't pretty, but it works.

Perhaps if someone has the energy or time, they could develop a series of
plugins to convert the different feed locations for different platforms to
work on Wordpress. Just offer a plugin version for each one (ie. Userland,
MT, Blogger). 

Of course depending on the environment your in, some people try to stay
clear of every plugin they can. For one site I did, I ended up just doing a
mod_rewrite to handle the old system feeds (this site averages 2-5 million
feed reads per day). When you consider adding in a plugin and that code
having to be compiled everytime WP starts (unless you're running opcode
caching), it makes more sense to let .htaccess handle it. 



Jamie Holly
http://www.intoxination.net



More information about the wp-hackers mailing list