Skip to content

Fix redirecting URL with query args#1797

Merged
amieiro merged 3 commits into
GlotPress:developfrom
pedro-mendonca:develop
Feb 23, 2024
Merged

Fix redirecting URL with query args#1797
amieiro merged 3 commits into
GlotPress:developfrom
pedro-mendonca:develop

Conversation

@pedro-mendonca

Copy link
Copy Markdown
Member

Problem

Currently the routes are being added a trailing slash without care for query args.
Example:
Current URL /glotpress/projects/wordpress/pt/default?page=2
Redirects to /glotpress/projects/wordpress/pt/default?page=2/

Solution

Only apply the trailingslashit() to the URL path and not to the complete URL.

Example:
Current URL /glotpress/projects/wordpress/pt/default?page=2
Redirects to /glotpress/projects/wordpress/pt/default/?page=2

@amieiro amieiro merged commit ed92688 into GlotPress:develop Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants