title: Mediawiki Rewrite to external site
body: <p>I am moving my site from Mediawiki to Wordpress and would like to redirect this page:</p>
  
  <p><a href="http://wecheck.org/wiki/Aaron_Swartz" rel="nofollow">http://wecheck.org/wiki/Aaron_Swartz</a></p>
  
  <p>to this page:</p>
  
  <p><a href="http://newslines.org/wiki/category/computer-people/aaron-swartz/" rel="nofollow">http://newslines.org/wiki/category/computer-people/aaron-swartz/</a></p>
  
  <p>Currently in .htaccess I have </p>
  
  <pre><code>Options +FollowSymlinks
  RewriteEngine on 
  
  RewriteCond %{QUERY_STRING} ^title=Aaron_Swartz$
  RewriteRule ^/w/index\.php$ http://newslines.org/wiki/category/computer-people/aaron-swartz/? [L,R=301]
  
  
  RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
  RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]
  </code></pre>
  
  <p>The second part makes the pretty URLs for mediawiki. I have tried many, many variations but I can't get it to work at all. Any help most appreciated.</p>
  
  <p><strong>UPDATE:</strong> Log file using the solution given. What is the .phtml?</p>
  
  <pre><code>[24/Jan/2013:22:01:00 +0000]  init rewrite engine with requested uri /wiki/Aaron_Swartz
  [24/Jan/2013:22:01:00 +0000] (1) pass through /wiki/Aaron_Swartz
  [24/Jan/2013:22:01:00 +0000] (1) [perdir /var/www/] pass through /var/www/w/wiki.phtml
  [24/Jan/2013:22:01:00 +0000] (3) [perdir /var/www/] add path info postfix: /var/www/w/wiki.phtml -&gt; /var/www/w/wiki.phtml/Aaron_Swartz
  [24/Jan/2013:22:01:00 +0000] (3) [perdir /var/www/] strip per-dir prefix: /var/www/w/wiki.phtml/Aaron_Swartz -&gt; w/wiki.phtml/Aaron_Swartz
  [24/Jan/2013:22:01:00 +0000] (3) [perdir /var/www/] applying pattern '^wiki/Aaron_Swartz$' to uri 'w/wiki.phtml/Aaron_Swartz'
  [24/Jan/2013:22:01:00 +0000] (3) [perdir /var/www/] add path info postfix: /var/www/w/wiki.phtml -&gt; /var/www/w/wiki.phtml/Aaron_Swartz
  [24/Jan/2013:22:01:00 +0000] (3) [perdir /var/www/] strip per-dir prefix: /var/www/w/wiki.phtml/Aaron_Swartz -&gt; w/wiki.phtml/Aaron_Swartz
  [24/Jan/2013:22:01:00 +0000] (3) [perdir /var/www/] applying pattern '^w/index\.php$' to uri 'w/wiki.phtml/Aaron_Swartz'
  [24/Jan/2013:22:01:00 +0000] (1) [perdir /var/www/] pass through /var/www/w/wiki.phtml
  </code></pre>