Rewritten url not being changed in url bar
<p>I made a page which loads content dynamically depending on the alias that was sent. This works fine, but the url stays uglified.</p>

<p>Example:
<a href="https://website.nl/aanbieding.php?alias=this-is-the-alias" rel="nofollow noreferrer">https://website.nl/aanbieding.php?alias=this-is-the-alias</a></p>

<p>But I want:
<a href="https://website.nl/aanbieding/this-is-the-alias.html" rel="nofollow noreferrer">https://website.nl/aanbieding/this-is-the-alias.html</a></p>

<p>htaccess rule:</p>

<pre><code>RewriteRule ^aanbieding/(.*).html /aanbieding.php?alias=$1 [L]
</code></pre>

<p>I got the exact same htacess rule for another page, and that one works like I want. </p>

<p>This one:</p>

<pre><code>RewriteRule ^diensten/(.*).html dienst.php?alias=$1 [L]
</code></pre>

<p>When I click from the page itself to another page (same file on the server but different loaded content) the url turns into what I want. Only when I open it from an email template the url stays ugly. </p>

<p>I link from the mail template like this:</p>

<pre><code>&lt;a href="https://www.website.nl/aanbieding/this-is-the-alias.html" style="color:#ffffff; text-decoration:none;" target="_blank"&gt;Bekijk aanbieding&lt;/a&gt;
</code></pre>

<p>Why is the url changing into my example?</p>