WordPress.org

Ready to get started?Download WordPress

Forums

Modify relative links in backend (2 posts)

  1. Frank Miller
    Member
    Posted 3 years ago #

    Hi,

    We are using a proxy to access our wordpress installation at
    http://MY_DOMAIN/wordpress using https://PROXY_DOMAIN/MY_DOMAIN/wordpress

    WordPress address (URL) in General Settings is configured:
    https://PROXY_DOMAIN/MY_DOMAIN/wordpress

    Some of the links in the backend are relative
    (href="wordpress/wp-admin/media-upload.php")
    and result in wrong GET requests linke https://PROXY_DOMAIN/wordpress/wp-admin/media-upload.php when accessing over the proxy.

    Is there a central wordpress-function that allows me to modifiy the generated links so that I can turn a href="wordpress/wp-admin/media-upload.php" into href="MY_DOMAIN/wordpress/wp-admin/media-upload.php" in order to get correct links when accessing the wordpress backend over the proxy? (which is planned to be the only way to access)

  2. Frank Miller
    Member
    Posted 3 years ago #

    Seems like I found a workaround. Adding
    $_SERVER['REQUEST_URI']='/MY_DOMAIN'. $_SERVER['REQUEST_URI'];
    to the wp-config.php file modifies the incomplete relative links in the backend.

Topic Closed

This topic has been closed to new replies.

About this Topic