WordPress.org

Support

Support » Plugins and Hacks » Building cruft-free WP urls. help with 404.php

Building cruft-free WP urls. help with 404.php

  • I’ve build a plugin that will change all the links to cruft-free URLs, like /category/post-name/, /category/ etc.
    Next step is to build 404.php so that it parses this, populates category_name and name values in the querystring and pass them all to /index.php.
    Problem is, when I do header(Location: ..), it also changes the URL displayed in user browser. This is similar to ASP’s Response.Redirect.
    Is there anything in PHP that is equivalent to ASP’s Server.Redirect() which does server transfer but does not “inform” user browser about that, so the URL is still the same?

Viewing 6 replies - 1 through 6 (of 6 total)
  • This is built-in to 1.3 already.

    Yes, I tried it, but it did not worked. When I set permalink structure to /%category%/%postname%/ it either threw an error or returned 0 posts. I tried two nightlies (Oct 10 and 14, I think).
    Anw, I tend to use stable versions, so I’m moving to WP 1.2.1, where the above links are not possible.
    However…am I right that I can use the 1.3alpha rewrite rules for the above structure, and that they will work in 1.2.1 too? I’m still preparing the files and awaiting an answer from hosting company, so can’t try it yet myself.
    I completed the plugin stuff and tested using Win2k3 server and custom 404.php.

    /%category%/%postname%/ does not work. It causes issues everywhere throughout the site. Namely, you can’t access /wp-admin/ or any subcategories for that matter. The rewrite rules need to be re-thought, because to me, /%category%/%postname%/ is by far the best choice.

    This would be cool… Have you guys found a PHP equivalent to ASP’s server.transfer()? I need to transfer file execution on the server w/out causing a browser redirect. I’d love to find a way in PHP… thanks.

    Umm.. it’s quite simple.
    ob_clean() // Get rid of anything that was already spit out
    include "file.php";

    thanks for the help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Building cruft-free WP urls. help with 404.php’ is closed to new replies.
Skip to toolbar