 <p>Where will the variable 123 come from? what is the variable input to compute 123? </p> <p>you can do the following</p> <pre><code>RewriteRule de/(.+) de/123/$1 </code></pre> <p>than de/somepage will be redirected to de/123/somepage.</p> <p>In addition of course you can do redirects without htaccess on server side using php </p> <pre><code>header("Location: http://www.example.com/"); /* Redirect browser */ </code></pre>