× Here you can get community support related to ReDJ.

Remove one varibale from query

  • jimmisonR
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 weeks ago #6623 by jimmisonR
Remove one varibale from query was created by jimmisonR
Good day!
For some reason, my site occasionally appends an &Itemid=435 to the page's query string, which lands the user on a non-existent page rather than the page they should be viewing.

For example, the login box on my site is sending users to:
-> mysite.com/component/users/?view=login&Itemid=435
instead of:
-> mysite.com/component/users/?view=login

While I work on figuring out the problem in the template or component, I want to use ReDJ to get the user where they should be. How do I strip the "&Itemid=435" from the query string and return the rest of the string (both anything before AND anything after the Itemid var)?

Thanks!

Please Log in or Create an account to join the conversation.

  • jimmisonR
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 weeks ago #6624 by jimmisonR
Replied by jimmisonR on topic SOLVED: Remove one varibale from query
I should also have mentioned that I don't have the enterprise version, so the querydrop macro won't work.

However, after some playing around, I came up with a solution myself.
From URL:      &Itemid=435
To URL:        {scheme}://{host}{path}{str_replace '&Itemid=435',''}{queryfull}{/str_replace}
Request Only:  True

Thanks for developing an amazing and powerful extension like ReDJ!!

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #6635 by admin
Replied by admin on topic SOLVED: Remove one varibale from query
Thanks and great solution BTW :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds