Custom Permalinks
Solution for 404 errors with SSL requests (5 posts)

  1. boxcarpress
    Posted 2 years ago #

    If you find that this works:

    ...but this doesn't:

    Then perhaps this patch will help you:

    Hope that helps :)

    (Before applying this patch, I found that HTTPS requests returned a 404 error. The code as written uses get_option('home') which always returns http://, when we need to actually use home_url() to respect the protocol of the request. I don't understand why the plugin author would bypasses home_url() in his code, but this patch doesn't seem to introduce any problems editing/viewing the custom permalink pages.)


  2. boxcarpress
    Posted 2 years ago #

    I guess the plugin supports WP 2.6 or higher and the home_url() function only appears in 3.0 or later. So, this patch won't work if you are pre-3.0.

  3. Tradedog
    Posted 2 years ago #

    Hi Harold, could you tell me how to install the patch.

    I have tried editing the links but it gives me a garbled version of what my edit says. Will the patch help?

    Many Thanks

  4. aminland
    Posted 2 years ago #

    Actually Harold I believe the only thing that needs to change is in the custom_permalinks_original_post_link function. That one is using get_option('home'), switching it to get_home_url() seems to work. It's also why custom permalinked pages are working on SSL without this change, as the custom_permalinks_original_page_link function uses get_home_url() already. I guess it's an oversight on the author's part.

    get_home_url is then defined later so that the old versions of wordpress will use the statically defined option home from the db.

  5. aminland
    Posted 2 years ago #

    @Tradedog, you can edit the file by going to /wp-admin/plugin-editor.php?plugin=custom-permalinks/custom-permalinks.php

    Just follow my post above.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Permalinks
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic