i have trouble to redirect (via .htaccess) an url like this:
www.url.com/index.php?option=com_content&task=view&id=60&Itemid=22
to
www2.url.com/something.htm
I figured out that the problem is the "old" URL. A "normal" redirect (www.url.com/test.htm –> www2.url.com/something.htm) works great.
I also tried it with rewrite but can´t find a solution that works.
Perhaps someone has and idea how to solve my problem?
Thanks a lot in advance
Lars.
FYI:
Server:
Apache and i have full root access to the server
EDIT Rewrite rule used:
I tried the following with rewrite rule in .htaccess
Test 1:
RewriteCond %{QUERY_STRING} option=com_content&task=view&id=63&Itemid=11 RewriteRule $ www2.url.com [R=301,L]
Result1: It redirects to the www2 url but not only to www2.url.com. It redirects to www2.url.com/option=com_content&task=view&id=63&Itemid=11
Test 2:
RewriteRule ^option=com_content&task=view&id=63&Itemid=11$ www2.url.com [R=301,L]
Result2: Nothing happend. Thanks for any further tip 🙂
Best Answer
For the www domain vhost:
And then on www2: