Extra params in URL for custom page cause not found (2 posts)

  1. wirespot
    Posted 10 years ago #

    I am using WP 1.5, without mod_rewrite, and my permalink template is this: /index.php/%post_id%/

    I expect heavy discussion on a new blog and I've decided to show comments on a separate page. I've created a page template called discussion.php and I've assigned it the slug "discussion".

    I call that page using URL's such as this: /index.php/discussion/10/, where 10 is the post id. After doing some additional tricks in the template, I replace the page $post with the requested post (10) and I proceed to display the comments. All well so far.

    Next, I thought I'd make the same page also serve a separate content, with only the comment posting form (why? because I'm also going to have threaded comments and I don't want to use JavaScript for "reply to this comment").

    So I tried using some of the following URL's, only to be greeted by WP's 404 template page:

    I've confirmed that discussion.php is never even reached when using the above URL's. Why is this happening and what can I do to make them reach discussion.php?

    The workaround would be using /index.php/reply/10/ and /index.php/reply/010/ (for simple reply and with-quote, respectively). But I don't like it much.

  2. wirespot
    Posted 10 years ago #

    Am I correct in assuming WP matches all URL's against the permalink structure and refuses anything non-matching? That would explain it refusing anything not alike "/index.php/discussion/%d".

    If I'm right, can I hack on this behaviour from within a plugin or custom page code?

Topic Closed

This topic has been closed to new replies.

About this Topic