Skip to content

Change Genesis.php url rewrites to accommodate https #101

Closed

Description

@mcheck

If an ssl site is set up, the genesis url rewrites are serving incorrect pages to non-production sites (only non-production, because production does not use Genesis::rewriteUrls(); )

In order to get the https assets and pages to serve correctly in dev/staging, change Genesis::rewriteUrls(); on or about line 25:

$new_url = (($_SERVER['HTTPS'] == '') ? ("http://") : ("https://")) . $_SERVER['HTTP_HOST'];

Activity

  1. mcheck commented on Jan 16, 2014

    @mcheck
    Author

    Ah, I realize I should have placed this on genesis/generator-wordpress

  2. ericclemmons commented on Jan 16, 2014

    @ericclemmons
    Contributor

    No, it's fine, the generator code lives on this project now for easier maintenance.

    I was going to remove rewriteUrls for v0.3, because of the issues with different environments. WP constants should be able to make hosts a non-issue.

  3. mcheck commented on Jan 16, 2014

    @mcheck
    Author

    Can you quickly explain how to use WP constants make hosts a non-issue? I've written some capistrano tasks to go through the db on :up and :down and regex change the hosts depending on where the data is moving. If there is a better way using WP constants, I'd love to know about it.

  4. ericclemmons commented on Jan 16, 2014

    @ericclemmons
    Contributor

    Some of the constants are in place now, but, IIRC, instead of rewriting urls, it'd be best to ensure (via hooks/filters) that URLs don't include the host name & only the path. Basically, correcting site_url() & others...

  5. added this to the v0.2.51 milestone on Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions