Hair Extensions with mod_rewrite and MAMP

I am using MAMP and I cannot get mod_rewrites to work.

After many games with numerous http.conf files, and then finally looked at my php_info, there is no mod_rewrite exstension installed.

I opened the php.ini files in applications> MAMP> conf> php5.2 and php5.3 and looked at exstensions and there was no mod_rewrite.so. All I see is:

extension=imap.so extension=yaz.so extension=mcrypt.so extension=gettext.so extension=pgsql.so extension=pdo_pgsql.so extension=pdo_mysql.so 

I added that he expects good luck - but without joy!

+4
source share
1 answer

I had the same problem and hopefully this will solve it for you.

I added my site to my host file so that instead of going through locahost / ..... It had its own URL, which I redirected to 127.0.0.1. that is, my host file looked like this:

127.0.0.1 mysite.local

Then I set up a virtual host in MAMP. The vhosts.conf file can be found in / Applications / MAMP / conf / apache

My host file is as follows

 NameVirtualHost * <VirtualHost *> DocumentRoot "/Applications/MAMP/htdocs" ServerName localhost </VirtualHost> <VirtualHost *> DocumentRoot "/Applications/MAMP/htdocs/mysite-folder" ServerName mysite.local </VirtualHost> 

Hope this helps: D

+5
source

Source: https://habr.com/ru/post/1347630/


All Articles