Forums

How does WordPress convert a post URL path and still send it to index.php? (4 posts)

  1. serialC
    Member
    Posted 2 years ago #

    Hi,

    I'm trying to understand how WordPress redirects (for example):
    http://www.myblog.com/acategory/apost/
    to:
    http://www.myblog.com/index.php
    and still capture the 'acategory' and 'apost' path names to determine which post to display?

    Regards,
    C-

  2. serialC
    Member
    Posted 2 years ago #

    I mean there is clearly no files or even path that exist at:
    http://www.myblog.com/acategory/apost/
    so it's just faking it somehow - but how?
    C-

  3. alanft
    Member
    Posted 2 years ago #

    the .htaccess file does that. it redirects everything that isn't to an existing file/folder to the WP index.php which then reads the URL and parses it to find out what was requested

  4. serialC
    Member
    Posted 2 years ago #

    Great! Thanks!
    C-

Topic Closed

This topic has been closed to new replies.

About this Topic