Question: how to get the values of multidimensional array.
code//

```
Array
(
    [0] => Array
        (
            [City] => Array
                (
                    [title] => Nagpur
                    [id] => 20299
                )

            [Branch] => Array
                (
                    [0] => Array
                        (
                            [id] => 8
                            [country_id] => 41
                            [state_id] => 102
                            [city_id] => 20299
                            [title] => Geotech Services Ltd.

                        )

                )

        )

    [1] => Array
        (
            [City] => Array
                (
                    [title] => kolapur
                    [id] => 20300
                )

        )

)

```

Here I want to get the only values if cities(title) so plz tel me how to fetch in cakephp..
Thanks in advance

Answer: 
Usually, it would have been fair to use `QUERY_STRING` to match query string parameters.  

But since you don't have leading `?` it does not consider it as query string. 

Your rule seems correct.  

Anyway, it looks like it does not work as expected. 

You can try the following alternative, which is working

```
RewriteRule ^(.*)&sa=U.*$ /$1 [L,NC,R=301]

```

---

EDIT: your rule is working the way you want, you only have to make your pattern more specific

```
RewriteRule ^([^&]*)&sa=U /$1 [L,NC,R=301]

```
If you want to make an rule base on the query string (= GET parameters), you have to use a RewriteCond, you can't access them through a RewriteRule. So :

```
RewriteCond %{QUERY_STRING} sa=U [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [L,R=301]

```