Hello all, I have problem with get param when I create redirects

I create solution, please see and check it

1. example redirect: rss?view=tags => tags
we have rss?view=tags => tags?view=tags why??? I need simple /tags
solution: remove $redirect->redirect_options['query']

2. second problem with Get param
example test/categories/21-test?limit=10&start=10 => test?page=1
wa have test/categories/21-test?limit=10&start=10 => 3%test?pageFpage%3D610 - very bad!
solution: we need create query param $redirect->redirect_options['query']

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mozh92 created an issue. See original summary.

mozh92’s picture

It work only admin interface /admin/config/search/redirect/list
help

mozh92’s picture

if(!empty($redirect->redirect_options['query']['limit']) && isset($redirect->redirect_options['query']['start'])){
    unset($redirect->redirect_options['query']['limit']);
    $count = $redirect->redirect_options['query']['start'];
    unset($redirect->redirect_options['query']['start']);
    $redirect->redirect_options['query']['page'] = $count/10;
  }

my dirty solution(

mozh92’s picture

FileSize
250.95 KB
pvasili’s picture

How it work?
I apply this patch and try url /catalog.php?cat=12. How create redirect to /catalog/12 ?

euk’s picture

Can replicate this.

I wonder if upgrading to RC3 would help?

Alternatively, check out #2804737: 7.x-1.0-rc4 release - there were a lot of fixes since RC3 release. Maybe grab latest 7.x-1.x-dev?
Alternatively, check out #2514248: Plan for Redirect v7.x-1.0 release - maybe grab latest 7.x-1.x-dev and apply patches from all related issues? This worked for me.