I have an apache server set up on my development machine, but the directories are a bit different when compared to my release server. I'm a bit of a noob when it comes to web development so please bear with me.
On my website, whenever I access [
mywebsite.com...] that brings me to ~/public_html/<file> on the server. However, on my local machine, ~/public_html/<file> when I'm logged in as "user" is accessed as [
localhost...] What this means is that any time I try to use paths like "/img/home.png" that tries to bring up the file "localhost/img/home.png" instead of "localhost/~user/img/home.png". How can I set it up so that my /home/user/public_html directory is the default directory requested when I access localhost?
I know that I can have a variable, and so before every html link I can do something like:
<?php echo("<img src=\"".homevariable."/img/myimage.png\"></img>") ?>
but I really don't want to have to do that...