How to create optional RewriteCond in Apache : <p>i have touble for my .htaccess config., this is part of config:</p>

<pre><code>RewriteCond %{QUERY_STRING} ^token=(.*)
RewriteRule ^aplikasi/(.*).asp aplikasi.php?halaman=$1&amp;token=%1
</code></pre>

<p>and result that config is:</p>

<pre><code>http://{domain}/aplikasi/{$1}.asp?token={%1}
</code></pre>

<p>if i using this link:</p>

<pre><code>http://{domain}/aplikasi/{$1}.asp
</code></pre>

<p>i have 404 error, i my question is : how to create like that with optional token prameter (i want to "?token={%1}" is optional)</p>
