Opened 7 years ago
Closed 6 years ago
#49085 closed defect (bug) (wontfix)
add_query_arg does not use WP_HOME or WP_SITEURL
| Reported by: | lonevvolf | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Plugins which use add_query_arg are producing invalid links when the website is hosted behind a reverse proxy with a different path than the installed application. While the domain name is correct, the path is wrong.
Change History (3)
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
6 years ago
#3
@
6 years ago
- Milestone Awaiting Review
- Resolution → wontfix
- Status new → closed
Hi @lonevvolf and welcome to Trac!
Due to the variety of configurations available for sites served behind a reverse proxy, the usual recommendation is for site owners to mess with the $_SERVER values in the wp-config.php file.
In add_query_arg() the default has been to assume the current URL for around 16 years, and determining that without system knowledge behind a reverse proxy is borderline impossible (is / served from /cms/ on the proxy, etc).
I'm going to close this off as wontfix, which is the term used on trac for tickets that won't have action taken on them.
Thansk.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Also, PATH_CURRENT_SITE could be utilized here for perhaps a more straightforward fix.