[wp-hackers] Taking over URL space
phillip.lord at newcastle.ac.uk
Tue Feb 21 09:58:28 UTC 2012
I was wondering whether someone could give me pointers in the right
direction. I'm not after a complete solution! I was just hoping that
someone with more knowledge of wordpress could tell me if I am heading
in the right way.
I wanted to write a new plugin which returns metadata about posts in a
variety of different ways. To do this, I need to use various parts of
the URL space, but I don't know how best to do this.
Essentially, I want to do three things.
1) I would like to be able to use bits of the URL space from top level.
So, for a wordpress at
I would like to be able to serve all requests to..
My initial idea was to achieve all this with rewrite rules, but
requiring users to modify .htaccess com. wp-rewrite seems the next
option -- I can just rewrite requests to this and underlying rewrite
2) I want to add support for file extension based access. So for a
URL such as
I'd like requests to
to be handled by my plugin, probably by sending the browser straight to
a URL of the http://mydomain.org.uk/myplugin. I am not sure how well
this would interact with pretty permalinks -- something of the form
looks daft with an extension
However, as far as I can see this is a similar problem to the last.
And, finally, I'd like to provide a content negotiated solution. So
will return different results depending on the content type in the
Accept: header of the request; again, this will probably be implemented
by forwarding the browser.
This one seems to be the most taxing -- I can't do this with rewrite
rules because it is the same in all cases.
Any pointers gratefully received!
More information about the wp-hackers