[wp-hackers] Rewrite Experiment
Ryan Boren
ryan at boren.nu
Sat Sep 18 19:05:19 UTC 2004
On Sat, 2004-09-18 at 14:40 -0400, Dougal Campbell wrote:
> Ryan Boren wrote:
> > On Sat, 2004-09-18 at 05:03 -0400, Mark Jaquith wrote:
> >> The only problem right now is that
> >>pathinfo appears to be broken for feeds.
> >>site.com/wordpress/index.php/feed/atom/ won't work using latest CVS, it
> >>just returns the blog's home page. The same thing can be seen on
> >>Craig's site ( http://blog.nuclearmoose.com/feed/rss2/ ).
> >
> >
> > I have no problem with pathinfo feeds in CVS. 1.2 does not support
> > feeds via pathinfo, but CVS "should" be fine. I'll look into it.
> >
> >
> >>Upsides of this method: no need to update rules with new WordPress
> >>version of URI scheme. Simplification of all the mod_rewrite rule
> >>creation code.
> >
> >
> > There's lots of upside, assuming it works for everyone. If anyone is
> > running Apache 1.3, I'd be particularly interested in knowing if this
> > works. mod_rewrite in 1.3 has a number of bugs and missing features
> > that we have to work around. If this works, we can handily avoid all of
> > those bugs.
>
> Ryan, I'm running Apache 1.3 under FreeBSD, and here are my findings:
>
> My test install is in a subdirectory, and I had to modify the last rule
> to included the subdir info like so:
>
> RewriteRule ^(.+)$ /test/wordpress/index.php/$1
>
> Once I did that, everything mostly worked fine, with a couple of
> exception: Feeds on monthly archives.
>
> These generate feeds:
> http://dougal.gunters.org/test/wordpress/feed/rss2/
> http://dougal.gunters.org/test/wordpress/comments/feed/rss2/
> http://dougal.gunters.org/test/wordpress/archives/2004/08/23/awooga/feed/
>
> http://dougal.gunters.org/test/wordpress/archives/category/general/feed/rss2/
>
> These just display the regular index page:
> http://dougal.gunters.org/test/wordpress/archives/2004/08/feed/rss2/
>
> http://dougal.gunters.org/test/wordpress/archives/2004/08/23/awooga/feed/rss2/
>
>
> I was running into some other comment-related weirdness for a bit, but I
> finally figured out that it was specific to the test Kubrick theme that
> you linked earlier. I've gone back to the default theme for now.
I moved the feed and trackback tests to the beginning of the template
redirection block in wp-blog-header. That should help the case where it
displays a regular page instead of a feed. Also, the feed links for
posts, categories, dates, authors, etc. are structured like this:
/feed
/rss2
/atom
not:
/feed/rss2
/feed/atom
/feed is simply an alias for /rss2
Ryan
More information about the hackers
mailing list