0

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

/index.php?route=product/search&filter_name=nike

Preffered URL

/search/nike

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

0

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.