Nginx rewrite individual urls with get parameters to pretty urls
<p>I have categories I'd like to rewrite.
for example:</p>

<p>example.com/videos?c=18</p>

<p>to:</p>

<p>example.com/category/name</p>

<p>I tried to do this using multiple examples, most had no effect and this example gave me only page not found to all /videos pages:</p>

<pre><code>location  /videos {
if ($args ~ "c=18") {
rewrite ^/videos(.*) http://$server_name/category/name$1 permanent;
}
}
</code></pre>

<p>Is this even doable purely via Nginx what I am trying to achieve?</p>