WordPress.org

Ready to get started?Download WordPress

Forums

URL Translation in WP code (4 posts)

  1. eliben
    Member
    Posted 7 years ago #

    Hi all,

    Can you please point me to the place in WP's PHP code where the URL is translated and WP figures what page / post to display.

    Thanks
    Eli

  2. moshu
    Member
    Posted 7 years ago #

    You'd have more chances to get a good answer if you describe what the desired end result would be.

  3. eliben
    Member
    Posted 7 years ago #

    The end result is to learn, really. I want to understand the whole process of going from the URL of some post to the post itself. I understand most of the stages already, but something is still missing.

    When I try to access the URL:

    myblog.com/2006/11/16/some-post/

    I know that mod_rewrite redirects it to index.php/2006/11/16/some-post

    I also know that the end result is comes from "single.php" . But I want to understand how WP knows to send it to single.php and how it knows which post to pull from the database.

    Thanks in advance

  4. Kafkaesqui

    Posted 7 years ago #

    Well, mod_rewrite does not 'redirect' it to

    index.php/2006/11/16/some-post

    but rather

    index.php?name=some-post

    And therein lies many a clue.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.