I've setup a static posts page named "Journal", mydomain.com/journal.
This page now lists my 15 latest posts. All fine this long.
I'm able to access each post individually by going to mydomain.com/postname.
I want to change this so I'm able to access each post individually by going to mydomain.com/journal/postname.
If I change the permalink structure to mydomain.com/journal/%postname%/ I can access posts with a permalink like mydomain.com/journal/im-just-a-regular-post/ just fine.
But if I go with a numeric permalink so I end up with an url such as mydomain.com/journal/12345 or a more complex (the endgame here) such as mydomain.com/journal/99058672222 it'll just serve me up the content of the posts page without even redirecting me.
If I revert the permalink settings to mydomain.com/%postname%/I can access my post at mydomain.com/99058672222 just fine. Why's that? Can I get around this somehow?
UPDATE I installed Debug Bar
This is what I get with mydomain.com/journal/regular-old-post
Request:
journal/regular-old-post
Query String:
name=regular-old-post
Matched Rewrite Rule:
journal/([^/]+)(/[0-9]+)?/?$
Matched Rewrite Query:
name=regular-old-post&page=
And with mydomain.com/journal/99058672222 I get:
Request:
journal/99058672222
Query String:
page=%2F99058672222&pagename=journal
Matched Rewrite Rule:
(.?.+?)(/[0-9]+)?/?$
Matched Rewrite Query:
pagename=journal&page=%2F99058672222
I can clearly see that they're different but I know too little about the mechanics of how the rewriting stuff works in WP. Any pointers?