[wp-hackers] Integrate URLs from custom plugins?

Tobias Nygren tobiasnygren at yahoo.se
Sun May 27 19:21:30 GMT 2007


Hi WP-hackers! 

I have a question that I've haven't found any answers
to in other Wordpress-resources, so my apologies if
this is already answered/solved before. 

Maybe my strategy below is wrong, but then I would be
very glad if anyone would point me in the right
direction.. 

I'm migrating a website to the Wordpress platform. One
part of the website is a weekly newsletter archive
where you can access certan newsletters this way: 

http://domain.com/newsletters/year(number)/week(number)/

Basicly, what I want to do is to send Wordpress to my
newsletter page (a wordpress page with a custom
template) that processes the url and shows the
newsletter. 

Tried following strategies without any luck: 
* a rewrite like this in htaccess:
RewriteRule ^newsletter/([0-9]{4})/([0-9]{2})/?($
nyhetsbrev/?year=$1&week=$2

* use the "page_template"-action hook together with
$_SERVER["REDIRECT_URI"]. This only seems to work for
the domain.com/newsletters/year(number)/ part. If I
user the full url as above, I end up at the 404 page. 

* use the "posts_request"-filter together with
$_SERVER["REDIRECT_URI"] and write the full sql-query
to the wanted page. Gives the same 404 page as above.

* I tried to use "post_rewrite_rules"-filter together
with something like the htaccess-rewrite-rule. However
I don't really know how to use it and this haven't
given me any results at all yet. 

So, is this totally wrong or what am I missing above?
Is there another way to achieve the same results? 

I am thankful for any kind of input in this matter. 


Thanks,

Tobias 
Sweden


      Låt vårkänslorna spira!
Hitta din tvillingsjäl på Yahoo! Dejting: http://se.meetic.yahoo.net


More information about the wp-hackers mailing list