title: WordPress - redirect with .htaccess an old .aspx link to external URL
body: <p>I am taking over an old website, that had dynamic redirects by routing through a .aspx file, like so:</p>
  
  <pre><code>/t/link.aspx?e=2&amp;u=0&amp;url=http://twitter.com/example
  </code></pre>
  
  <p>I would simply like to redirect this to:</p>
  
  <pre><code>https://twitter.com/example
  </code></pre>
  
  <p>Here's what I've tried so far, but the problem is, I get a Forbidden error.</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  
  # These are Wordpress rules.
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  
  # This is the part I'm trying out.
  RewriteRule ^link.aspx$ https://twitter.com/example [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>However, all I get is the following error:</p>
  
  <blockquote>
    <p>Forbidden 
    server. Apache Server at example.com Port 443 You don't have permission to access /link.aspx on this</p>
  </blockquote>
  
  <p>link.aspx doesn't actually exist and my server doesn't run ASP or .NET but I was hoping this wouldn't matter since .htaccess is at the server level.</p>
  
  <p>I have also tried a more exact rule, but still get the same issue:</p>
  
  <pre><code>Redirect 301 /t/link.aspx?e=2&amp;u=0&amp;url=http://twitter.com/example https://twitter.com/example
  </code></pre>
  
  <p>Any ideas? Many thanks :)</p>