Apache/PHP - alias outgoing URL
Posted
by Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2010-03-24T17:44:26Z
Indexed on
2010/03/24
17:53 UTC
Read the original article
Hit count: 509
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.
© Stack Overflow or respective owner