.htaccess URL rewrite works, but address bar then shows 'dirty' URL <ul> <li>User clicks link (from their email): <code>http://www.site.com/edit/wih293f73y</code></li> <li>Browser window opens and gets them to the correct page.</li> <li>But now the browser's address bar shows: <code>http://www.site.com/editor.php?editCode=wih293f73y</code></li> </ul> <p><strong>Extra info:</strong></p> <ul> <li>My rewrite rule is:<code>RewriteRule ^edit/([A-Za-z0-9-]+)/?$ editor.php?editCode=$1 [NC,L]</code></li> <li>This problem ONLY occurs when the user has clicked a link. It works perfectly when you just type the pretty url into the address bar.</li> <li>This problem <strong>ONLY occurs for links that include the <code>www.</code></strong> - the link <code>http://site.com/edit/wih293f73y</code> works like a charm.</li> <li>My .htaccess file includes the following code (from HTML5 boilerplate, which I wasn't aware of previously):</li> </ul> <blockquote> <pre><code># Rewrite www.example.com → example.com &lt;IfModule mod_rewrite.c&gt; RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] &lt;/IfModule&gt; </code></pre> </blockquote> <p>If it's important, this occurs after my other rewrite rules.</p>