How to rewrite the url of search result page?

the url of search result page is like:
If I hope it rewrite into, which will be fit for SEO, the ChatGPT tell me to add this rule into Nginx rewrite rule:

if ($args ~* "match=all&subcats=Y&pcode_from_q=Y&pshort=Y&pfull=Y&pname=Y&pkeywords=Y&search_performed=Y&q=([^&]+)&") {
        set $search_query $1;
        rewrite ^ /$search_query/s?k=$search_query redirect;

If ChatGPT is right , what will be the whole code?

This is only half of the path, as the URL of the search results page generated by the store will still be the same.

Such a modification will require changes in the installation’s code. Most possibly, such changes can achieved without making any changes in the server configuration. You can contact our certified partners for the necessary implementation.

The cs cart‘s search result page like is too long and too complicated, I hope all search resuld pages should be rewrited like How can I do it?

Install, activate, and set up the SEO addon from CS-Cart (should be part of the default cart software).

Tthe default SEO ADDON can not do it on this.

Quite complex modification in the SEO module is required to do it. If you need to do it for several URLs only (e.g. for promotion purposes), you can use our module

Thank you for your suggestion, what I need is not a single or a few URL rewrites, I have hundreds of thousands or more of these URLs to rewrite.

1 Like

In this case hire someone to create such a modification for you