Hey, (php/apache server) I can't work out how to do the following using htaccess: www.domainone.com/folder/filename.php?variables redirects/rewrites to www.domaintwo.com/filename.php?variables but keeping the domain as domainone I.e. pulling the file from domaintwo, but keeping the visible domain as domainone I thought I should be able to do it with RewriteRule in .htaccess but can't get it to do what I want... First step would be to: www.domainone.com/folder --> www.domaintwo.com and then adding in the filename.php and ?variables on the end. Any help, most appreciated. Thanks
You need mod_proxy installed then in folder put a .htaccess: RewriteEngine On RewriteRule ^(filename.php)$ http://www.domaintwo.com/$1 [P] Code (markup):
You need to write a PHP script which is filename.php on the source server which takes the request and then for arguments sake uses curl to send the request to the domaintwo server, collects the output and returns it to the user. The PHP script acts as a proxy, however your host might take offence to this if they don't allow proxy scripts as you'll only be billed for 50% of the bandwidth used by the script.