My url:
x.com/ara?il=istanbul&ilce=avcilar&marka=opel&model=corsa
x.com/rent/istanbul-avcilar-opel-corsa
In htaccess:
RewriteRule ^rent/([0-9a-zA-Z-_]+)-([0-9a-zA-Z-_]+)-([0-9a-zA-Z-_]+)-([0-9a-zA-Z-_]+)$ ara.php?il=$1&ilce=$2&marka=$3&model=$4 [L,QSA]
it does not work if there is no ilce or model parameter in the URL. but otherwise it works perfectly
So I want it to work also in these situations
x.com/ara?il=istanbul&marka=opel&model=corsa
x.com/rent/istanbul-opel-corsa
x.com/ara?il=istanbul&marka=opel
x.com/rent/istanbul-opel
x.com/ara?il=istanbul&ilce=avcilar&marka=opel
x.com/rent/istanbul-avcilar-opel
How should htaccess be for this?