Support » Plugins » Hacks » How does WP normally handle archive uris?

  • The standard archive uri for slug based permalinks seems to be:

    /year/month/ for instance this month is


    When I hack my own theme that uri will resolve to the home page. Is it up to my home page in my theme to do the proper forwarding? I think could do something like in home page template:

    $uri = $_SERVER[‘REQUEST_URI’];
    $a = explode(“/”, $uri);
    if (is_numeric($a[0]))
    header(‘Location: /archives’.$uri ) ;

    Is that the way it’s normally done? I could also use /archives/2013/02/ in my urls, but it seems a bit nonstandard.


Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    Take a look at Query Overview for how it is normally done. Whether you need to forward the request elsewhere or not would depend on how you intercept the current month request to go to your home page. If done properly, you shouldn’t have to do anything. Any archive request outside the current month should get parsed normally. If this does not happen, I would suggest you are likely doing it wrong 😉

Viewing 1 replies (of 1 total)
  • The topic ‘How does WP normally handle archive uris?’ is closed to new replies.