Issue
In Mamp pro I want both the www.test.com and test.com domains to be redirected to the same folder on localhost, do I have to enter them both or is there some option to automatically apply the settings of one to the other so i don't have to enter them both?
Solution
Use a ServerAlias
in the virtual host config. For MAMP PRO you should be abale to just add ServerAlias test.com
to the Customized virtual host general settings
box on the Advanced Virtual Hosts Configuration
tab.
Otherwise, locate the virtual host declaration in /Applications/MAMP/conf/apache
and add it manually.
<VirtualHost *>
DocumentRoot /Applications/MAMP/htdocs/test.com/
ServerName www.test.com
ServerAlias test.com
<Directory "/Applications/MAMP/htdocs/test.com/">
Order allow,deny
allow from all
</Directory>
</VirtualHost>
You will need to restart Apache to make the configuration active.
Answered By - PassKit
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.