Hey everyone, I'm working on a little project for redirecting wordpress links to another cms. I can't find how wordpress knows which record to pull when the permalink is set to month and name. Which looks looks like this: http://test.com/wp/2010/02/sample-post/ I know it uses .htaccess to redirect to index.php but I'm not which function actually does the sql query to find the row. Does anyone know or can point me in the right direction?
It's pretty confusing under the covers... why don't you just use htaccess to run the redirect. Faster and easier!
I can't use htaccess redirect because there is no way of knowing the row id since the row id is not in the url.
It'll be looking for the slug on that date - not a difficult query to write yourself... and it relies on there not being two records with the same slug on any given month.