I am trying to clean url redirecting query string URL. I've tried all answer and rules provided in stackoverflow and in other sites, but nothing changed. I thought it was .htaccess file error, but I found it is working fine to generate other error. I am trying to redirect 

```
http://localhost/ourallnews/category.php?cat=News

```

To

```
http://localhost/ourallnews/News/

```

First I tried using this.

```
RewriteEngine on
RewriteCond %{QUERY_STRING} ^cat=(\w+)
RewriteRule ^ourallnews/category\.php$ /ourallnews/%1? [R=302,L]

```

After that I tried

```
RewriteEngine on
RewriteCond %{QUERY_STRING} ^cat=(\w+)$
RewriteRule ^ourallnews.*$ /ourallnews/%1/? [R=302,L]

```

**Nothing changed.** 

I clear browser cache, restart apache but doesn't work. Querystring url is remained.

**Then finally this one brings change.** 

```
RewriteCond %{QUERY_STRING} .
RewriteRule ^ %{REQUEST_URI}? [R=301,L]

```

It change

```
http://localhost/ourallnews/category.php?cat=News

```

to

```
http://localhost/ourallnews/category.php

```

But my requirement is show querystring value not URI. 

```
http://localhost/ourallnews/news/

```

Please help me