I have a live site and I want to redirect a page to my current machine I'm developing on. I tried the following
header('HTTP/1.1 307 Temporary Redirect');
header('Location: http://localhost/dev/test.php');
The redirection should NOT be done to the live server's localhost, but to my local machine I'm currently using to develop. This is simply to test a payment gateway I've added to my site (the payment gateway requires a valid URL to redirect to, hence I can't use localhost).
The payment gateway will redirect to
http://www.example.com/test.php
Which should then be redirected to my current machine:
http://localhost/dev/test.php
If php can't manage this, can I do this with apache redirects? I also want to send all GET and POST parameters received at the live server to my local page.