Opened 4 years ago
Last modified 22 months ago
#51141 reopened defect (bug)
URL parameters are altered on static homepage after unneeded 301 redirect
Reported by: | kevindeleon | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
It seems as though all WordPress sites that I’m supporting for various clients has this same functionality — if the site is using a static homepage, and you visit the homepage with a query string containing +
signs — the page is redirected (301) and the plus signs are turned into %20
— Interior pages and posts do NOT suffer this same effect.
For example (I am not supporting this site, just using it as an example):
https://wpengine.com/?test=test+test (redirect occurs)
https://wpengine.com/plans/?test=test+test (no redirect occurs)
Another example:
https://wordpress.org/support/?test=test+test (redirect occurs)
https://wordpress.org/support/article/overview-of-wordpress/?test=test+test (no redirect)
Our site analyst (SEO, tracking, etc) uses plus signs in his query string data and this can be problematic. It seems that the homepage should not be doing this.
This also does not seem to affect sites that don’t use the “static homepage” option.
Change History (5)
This ticket was mentioned in Slack in #core by chaion07. View the logs.
4 years ago
#3
@
4 years ago
I can confirm observing the behavior in the provided links as described, with 301 redirects to the homepages with the +
character in the querystring value replaced with it's URL-encoded equivalent, %20
.
I was additionally able to reproduce the behavior locally on trunk revision 50021 running on Apache with a host-file mapped domain. Setting the static homepage to the "Sample Page" and visiting the homepage with a ?test=test+test
querystring was sufficient. The behavior occured over HTTP and HTTPS, as well as regardless of being logged in or not.
I could not reproduce the behavior using @wordpress/env
3.0.0 with the same trunk revision using the default localhost:8888
URL mapping. I also did not witness the behavior after assigning a host-file mapped domain to the site and adjusting it's WP_HOME and WP_SITEURL constants appropriately (but still including the port in the host).
#4
in reply to:
↑ 2
@
4 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
Replying to technocrews:
Hello @kevindeleon
Welcome to WordPress Core Contribution! Thank you for submitting this ticket. I have checked your link. It is not provided any 301 redirects for me.
I have also tested on my local environment and couldn't reproduce the issue. Perhaps some screenshot from your end would be more helpful to figure out if there is any 301 redirect for the query string.
Thanks once again. Keep Contributing.
As @bosconiandynamics said -- it's pretty straightforward to witness in any browser dev tools re-network panel. Open network panel, click on the homepage links I gave above to two different wordpress installs. I can list countless more that have the same issue. I'm attaching pictures here that show the redirect happening on both of the links above. Re-opening.
#5
@
22 months ago
Hi everyone,
I just ran into this issue myself and while doing some research on this and trying to figure out, what causes the redirect, I found this ticket. Are there any news on this ticket? I know it has been a while since somebody was active here, but I thought I give it a try.
The bug still exists as of today with the latest WP version.
Hello @kevindeleon
Welcome to WordPress Core Contribution! Thank you for submitting this ticket. I have checked your link. It is not provided any 301 redirects for me.
I have also tested on my local environment and couldn't reproduce the issue. Perhaps some screenshot from your end would be more helpful to figure out if there is any 301 redirect for the query string.
Thanks once again. Keep Contributing.