There's 1 domain (www.domain1.com
Let's suppose the original URL is: http://www.domain1.com/view?product=1341342
I have no access to this webserver.
What i would like to obtain is the following kind of URL rewrite:
(I have access to the www.domain2.com
When the user goes to http://www.domain2.com/view?product=1341342
a php script should read the "/view?product=1341342" part (for statistic purposes, i have the script for that) then redirect the location to http://www.domain1.com/view?product=1341342
In short, what i don't know how to implement is how to read the domain2 URL's product and redirect the user to the domain1's right URL with a PHP file:
The originating URL is http://www.domain2.com/view?product=1341342
the destination URL in the browser is http://www.domain1.com/view?product=1341342
while redirecting PHP must take note of the product page.
Also (speaking about removing the domain from the URL) the product page URL could have a different name.