 <p>Try adding Flags to your rules :</p> <pre><code>RewriteRule ^jokes-([^/]+)/([a-zA-Z0-9-]*)/?$ jokes.php?c=$1&amp;id=$2 [QSA,NC,L] RewriteRule ^jokes-([a-zA-Z_]+)/?$ jokes.php?c=$1 [QSA,NC,L] RewriteRule ^jokes/?$ jokes.php [NC,L] </code></pre>