I am using MAMP (version 1.7) to test PHP sites locally. I set up an alias in the Apache http.conf file. It works properly when I am browsing the directories, but includes in my PHP files don't work.
E.g., if I set an alias like this
and I have a PHP file in:
and I try:
where myfile.php is located in
then the include doesn't work.
But when I browse to /mysite.com/website/aliasfolder/ I end up in /Applications/MAMP/htdocs/realfolder/.
Am I doing something wrong, or is it just not supposed to work this way? Is the alias not set correctly? (I don't anything about Apache.)
E.g., if I set an alias like this
Code:
Alias /mysite.com/website/aliasfolder/ "/Applications/MAMP/htdocs/realfolder/"
<Directory "/Applications/MAMP/htdocs/realfolder/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Code:
/mysite.com/website/php/
Code:
include("../aliasfolder/myfile.php");
Code:
/Applications/MAMP/htdocs/realfolder/
But when I browse to /mysite.com/website/aliasfolder/ I end up in /Applications/MAMP/htdocs/realfolder/.
Am I doing something wrong, or is it just not supposed to work this way? Is the alias not set correctly? (I don't anything about Apache.)