mod_rewrite not working on mac. Enabling .htaccess problem on mac

mod_rewrite not working on mac. Enabling .htaccess problem on mac

As a PHPer you would know what the mod_rewrite is and what the .htaccess file is right? if not a bit of googling would shower with a bunch of tutorials.
Now to the point:)
Being on mac do the following to enable mod_rewrite
1. Check if the module is loaded.
Navigate to apache2 folder

cd /etc/apache2

and open the conf file

sudo vi httpd.conf

Now, search for rewrite and you will and to something like this one

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

if it is commented out, that is if there is a #infront of it, uncomment it and exit
2. Being in the current file, search for AllowOverride and replace the “None” by “All”

3. Got to the directory /etc/apache2/users and open the conf file of your username. Like if your username is gullele, there would be file gullele.conf. Bing inside the file, search for AllowOverride and give it the value of “All”

now restart your server

sudo apachectl restart

Happy rewriting :)

Get your filezilla password from your mac

Mount to NSF Server timed out on Vagrant

Failed to Retrieve Share List from Server when connecting unix

Wi-fi connected but no internet mac troubleshooting

Serve more than one site using virtualhosts on mac OSX

Connecting to Vagrant [PuPHPet] MySql from host

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*