• Want to redirect any ?p=123 URLs to their proper permalink?

    Check out https://isaacschlueter.com/plugins/i-made/cannonical-url/

    This also works on any “shortcut” URLs that you may have. For example, if you have rewritten /p123 to index.php?p=123, then this plugin will also redirect any such requests to their proper permalink location.

    This only works on single-post requests. If there’s enough interest, I may expand it to redirect other kinds of URIs.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Perhaps I’m missing something.. Unless you’re on a non-Apache server, which isn’t the case for you, at least, what’s the benefit here? If you’re on an Apache-based server, why not just use mod_rewrite?

    Thread Starter isaacschlueter

    (@isaacschlueter)

    Oh, the plugin won’t be of much value if you don’t use pretty permalinks (it’d be kind of silly then.)

    The value is that, even with mod_rewrite, a person still *can* go to index.php?p=123. In fact, I sometimes write non-standard single-post URIs in my own posts, simply because /p303 is less typing than /2005/10/sidebar-expando/. However, if a user clicks on that link, or if a search engine stumbles across it, I still want them to go to the proper permalink URI instead.

    Hence, the plugin. ??

    Doing these redirects with mod_rewrite would be impossible. The idea is to take ANY request for a single post, and redirect it to the cannonical permalink.

    if activated, 404 handling doesn’t work properly anymore

    Thread Starter isaacschlueter

    (@isaacschlueter)

    Ah! Thanks, Lynk!

    Problem fixed now. It’s kind of odd that get_permalink returns something even when there are no posts.

    Thread Starter isaacschlueter

    (@isaacschlueter)

    That problem, along with a few others, has been solved in the new version, available now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘New Plugin: Cannonical URL’ is closed to new replies.