Posted by:
sKunKbad
(---.lsanca.fios.verizon.net)
OK, so in regards to base_url() or url::base(), both of these functions will derive a domain in url context from the current page visited.
So, for instance, if you are visiting http:/ / www.brianswebdesign.com/estimates.php , the base_url() or url::base() function would return http:/ / www.brianswebdesign.com/
Likewise, if I was on localhost, the base_url() or url::base() function would return http:/ / localhost/
In my php file, when I am making a link, I can use something like this:
<?php echo '<a href="' . base_url() . 'estimates.php">Website Estimates</a>'; ?>
and if I was on my development server the link would be made to work on localhost, and if I am on my production server, the link is made to work with [
www.brianswebdesign.com]. Yes, I could use relative URLs, but this gets messy when going into subdirectories, or when creating links to CSS files and javascript files.
So, this is why what I did with the hosts files and wampserver.tpl is enough for my needs. Oh, and I also edited english.lang so that my left click menu shows rbg72.web instead of localhost.