Apache/PHP - alias outgoing URL
- by Dan
In my PHP code I've got references to a URL on another website. I'm testing my website locally (using XAMPP). Is it possible to get Apache to automatically replace the domain of this other website for localhost?
For example my PHP code might be:
<?php echo "<a href='http://www.othersite.com'>Click me</a>"; ?>
And I'd like for my local Apache to alias this to
<?php echo "<a href='http://localhost'>Click me</a>"; ?>
Is this possible?
Cheers,
Dan.