craft-plugin-redirect icon indicating copy to clipboard operation
craft-plugin-redirect copied to clipboard

Question mark (?) automatically added to end of all redirected urls

Open satcreative opened this issue 1 year ago • 10 comments

I'm currently experiencing an issue where a question mark is being appending to the end of all destination urls once the redirect has happened. Is anyone experiencing the same or have a solution?

PHP version | 8.0.5 MySQL 8.0.21 Craft Pro 4.4.7.1 Redirect Manager | 2.0.1

satcreative avatar Apr 20 '23 10:04 satcreative

Looks like someone is already trying to address this in PR https://github.com/Dolphiq/craft-plugin-redirect/pull/137

Fix in there if anyone needs it.

meredevelopment avatar Apr 24 '23 11:04 meredevelopment

How can I get this fix installed? Is there a new update out which no longer adds a question mark to end of redirect URLs?

I've just updated to v2.0.1 but the issue still persists.

danfathom avatar May 11 '23 09:05 danfathom

I got v2.0.1 and issue persist

dolphiq/redirect/src/controllers/RedirectController

Added if statement on line 90:

if($this->request->getQueryStringWithoutPath()){ $destinationUrl .= "?" . $this->request->getQueryStringWithoutPath(); }

alvinbutterhk avatar May 15 '23 08:05 alvinbutterhk

@alvinbutterhk Oh, replace line 89: $destinationUrl .= "?" . $this->request->getQueryStringWithoutPath();

with

if($this->request->getQueryStringWithoutPath()){
$destinationUrl .= "?" . $this->request->getQueryStringWithoutPath();
}

jon-collette avatar May 19 '23 16:05 jon-collette

if this would be merged...: pull request https://github.com/Dolphiq/craft-plugin-redirect/pull/137

duncandejong avatar Oct 17 '23 09:10 duncandejong

Hi,

Would indeed be nice if the PR get's merged.

Thank you

thomasgoemaere avatar Oct 28 '23 10:10 thomasgoemaere

Any feedback on this?

Thanks

thomasgoemaere avatar Jan 23 '24 08:01 thomasgoemaere

Would be helpful if #137 gets merged, all redirects have ? added to the end of the destination URL.

jannisborgers avatar Feb 07 '24 08:02 jannisborgers

Hi, please merge this :)

davorpeic avatar Feb 11 '24 18:02 davorpeic

please merge the fix

seandelaney avatar May 28 '24 11:05 seandelaney