Currently I have my rewrite queries like so

  rewrite ^/category/category-name /index.php?route=information/category-name last;

This works fine for my pages that are static and i know the name to. The problem i run into is whenever i want to modify my opencart search route

Current URL


Preffered URL


I've tried doing my previous way but nothing happens.


Is this what you want?

rewrite ^/search/(.*)$ /index.php?route=product/search&filter_name=$1 last;

The rewrite directive is documented here. And a useful resource for regular expressions.

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.