Using htaccess how to convert
To
Below condition throws an error:
.htaccess: RewriteCond: cannot compile regular expression 'param1[]=(.*)'
RewriteCond %{QUERY_STRING} param1[]=(.*)
RewriteRule ^(.*)$ /%1/ [QSD,L,R=301]
You need to escape [ and ] as those are special regex meta characters:
RewriteCond %{QUERY_STRING} (?:^|&)param1\[\]=([^&]*) [NC]
RewriteRule ^ %{REQUEST_URI}/%1 [QSD,L,R=301]