2

I am trying to fine tune my catalog search. From the backend I've assigned, for example, to the following search term 'iphone camera' the following URL: https://example.com/catalogsearch/result/index/?brand=48&mobile_camera_type=260%2C261&q=iphone+camera

Now when I am entering the search term in the frontend, I am unable to access the aforementioned assigned page, and instead have been getting 'ERR_TOO_MANY_REDIRECTS' error.

enter image description here

enter image description here

1

If you call the search controller without a query parameter Magento will redirect to the referrer URL (or homepage if no referrer is found). With your search term based redirect you produce an infinite loop:

  1. URL call: /catalogsearch/result/index/?brand=48&mobile_camera_type=260%2C261&q=iphone+camera

  2. match redirect for search term iphone camera and call redirect: /catalogsearch/result/index/?brand=48&mobile_camera_type=260%2C261

  3. search result controller makes redirect to referrer, because there is no query parameter and calls: /catalogsearch/result/index/?brand=48&mobile_camera_type=260%2C261&q=iphone+camera

You shouldn't use URLs with search result controller whithout query parameter if you want to avoid such redirect situations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.