I'm trying to set up a virtual host with MAMP for mac.
I'm doing this, because we need to have root relative urls for our project, but I just can't get the root relative links to work.
We are including a footer.php file on an index.php file like this:
<? include('/master/footer.php') ?>
But the / before master does not work, and this is what I need to fix.
Below is what I have done so far. Hope someone can help me out.
MAMP - httpd-vhosts.conf:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs/"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs/template/"
ServerName template.localhost
</VirtualHost>
MAMP - httpd-conf:
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
My port is set to 80 on MAMP and I have restarted it :)