Rewrite URL with 1 or several query in htaccess
<p>I have a URL with query that one of it's query maybe is not set.
Target URL:</p>

<pre><code>domain.com/category.php
</code></pre>

<p>Query of URL:</p>

<pre><code>1. c = any character in UTF-8 [It is required]
2. page = number [It is not required and maybe not set]
</code></pre>

<p>Now, how change URL in .htaccess:</p>

<p>from <code>domain.com/category.php?c=anyCharacter</code> to <code>domain.com/category/anyCharacter/</code></p>

<p>and from <code>domain.com/category.php?c=anyCharacter&amp;page=number</code> to <code>domain.com/category/anyCharacter/page:number/</code></p>

<p><strong>UPDATE</strong>:</p>

<p>I found an answer but it is not complete.</p>

<pre><code>RewriteRule ^category/(.*)/$ category.php?c=$1 [QSA,L]
</code></pre>

<p>This will change URL:</p>

<p>from <code>domain.com/category/anyCharacter/</code> to <code>domain.com/category.php?c=anyCharacter</code></p>

<p>and from <code>domain.com/category/anyCharacter/?page=number</code> to <code>domain.com/category.php?c=anyCharacter&amp;page=number</code></p>

<p>But it's not <strong>good answer</strong> because I don't want any user see <strong><em>Query</em></strong> in my URL.
<em>Please do not write my answer again.</em></p>