WordPress.org

Ready to get started?Download WordPress

Forums

Link generation with ssl-proxy (4 posts)

  1. Frank Miller
    Member
    Posted 3 years ago #

    We are using a ssl-proxy to access our wordpress installation.

    The installation itself is located at
    http://www.my-domain.com/wordpress

    To use the proxy the following address is required:
    https://ssl-proxy-com/www.my-domain.com/wordpress

    Configuration of 'WordPress address (URL)' in 'General Settings' is:
    https://ssl-proxy-com/www.my-domain.com/wordpress

    Strange thing is that some actions (in the backend) work and others don't. Just one example:
    When I want to insert an image using the 'Media Library' I get the following:
    "The requested URL /wordpress/wp-admin/media-upload.php was not found on this server."

    The GET request that is being sent is the following:
    https://ssl-proxy-com/wordpress/wp-admin/media-upload.php?post_id=5&type=image&tab=library

    The part 'www.my-domain.com' after the domain missing.
    Seems like link generation is not (always) based on the 'General Settings'

    Is this a common problem?
    If yes, is there a workaround?

  2. Frank Miller
    Member
    Posted 3 years ago #

    Ok, I think I found a solution.
    Whenever wordpress generates a relative link I have to add a prefix.
    so that
    /wordpress/wp-admin/media-upload.php?post_id=5&type=image&tab=library
    becomes
    /www.my-domain.com/wordpress/wp-admin/media-upload.php?post_id=5&type=image&tab=library

    I examined the code for a while now and found multiple functions that seem to be responsible for link generation. But before I get started:

    Is there a simple and short way to do this modification ?
    Maybe I have overlooked something like a general function for link generation?

  3. fireitup
    Member
    Posted 3 years ago #

    I'm experiencing the same problem. Couldn't find any info on the web, but I would think this must be a common problem. SSL is pretty much useless this way.
    Frank: Have you made any progress? Did you mean modifying the core files by saying you had to add a prefix?

  4. fireitup
    Member
    Posted 3 years ago #

    Found a solution.
    Add this to your wp-config.php:

    $_SERVER['HTTPS']='on';
    $_SERVER['REQUEST_URI']='/my-domain.com'. $_SERVER['REQUEST_URI'];

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags