I wish to rewrite an url such as this: http://www.piata-bio.ro/presa-bio.php?var1=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHmU7U7bXtlH9Lo8dXfBs64PqxgbA&url=http://www.eva.ro/divertisment/stiri/un-nou-concept-de-magazin-articol-35491.html

to something similar to this : http://www.piata-bio.ro/presa-bio.php?var1=www.eva.ro/divertisment/stiri/un-nou-concept-de-magazin-articol-35491.html

Essentially I wish to strip to google news part and just remain using the final url (with no "http://").

I have been trying a variety of solutions but nothing labored to date. FYI - I personally use wordpress

Any help could be greatly appreciated.

htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} url=(?:http://)?(.*)
RewriteRule presa-bio.php presa-bio.php?var1=%1 [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
 # END WordPress

It can be done by matching the query string inside a rewriteCond :

RewriteCond %{QUERY_STRING} url=(?:http://)?(.*)
RewriteRule presa-bio.php presa-bio.php?var1=%1 [L]

(When the ?: doesn't work with rewriteCond, loose it and employ %2 rather than %1 within the next rule).