mod_rewrite rule for a variable containing a minus sign in URL
<p>I have this regex:</p>

<pre><code>^(.*)\/\?datum\=(.*)\.(.*)\.\-(.*)$
</code></pre>

<p>which perfectly matches an URL like:</p>

<pre><code>http://www.example.com/sub/page/?datum=1.3.-0002
</code></pre>

<p>But when I use it as mod_rewrite rule, it just does't get fired.</p>

<p>All I need is to through a 404 error whenever there is a negate year in the "datum" variable in the URL.</p>

<p>I tried something like</p>

<pre><code>RewriteRule ^(.*)\/\?datum\=(.*)\.(.*)\.\-(.*)$ -[R=404]
</code></pre>

<p>but it didn't work.</p>

<p>Any help appreciated!</p>