I do the filter. There are fields where the filter goes through the array. In the url string, this array designation is generated here: http://standart.dev/site/sell?city[]=87&city[]=88&city[]=89&course_type=1&price_type=1

Where there are checkboxes - this is how it forms ..city[]=87&city[]=88..

How can url be made more seo-friendly? In general, what other symbols of the array designation in the url-line can be used ??

    1 answer 1

    url more seo-friendly: http://standart.dev/site/sell/city/87/88/89/cource/1/price/1/

    the question is only in how you will handle this URL.

    I do not recommend "SEO" search strings with filters. Pass filter parameters through POST, SEO, only main sections, for example /sell/city/moscow/ =)

    • This url is appropriate, if only the array is somehow different to do, on how I did not try to register differently in the url line itself - it does not understand that this is the city[]=87&city[]=88&city[]=89&course_type=1&price_type=1 array city[]=87&city[]=88&city[]=89&course_type=1&price_type=1 - Vlad Shkuta
    • Get not as an array, write your router in which you collect your array yiiframework.com/doc-2.0/guide-runtime-routing.html - Connor Holt
    • No, the problem is that in the url string you need to pass only the value that php will take for the array. Of course, I can somehow form the url, and a comma, and a semicolon, but this will not be taken as an array, and the filter will work only for the first element. - Vlad Shkuta
    • Unfortunately, only a line in the form ?a[]=1&a[]=2 can be perceived as an array. If these are filters that do not need "SEO" - pass them through POST, users do not always need links to "search strings", they rather need links to a specific "product" - Maksim Zlatov