Using mod_rewrite is a day-to-day thing when developing modern web applications, especially with frameworks such as CodeIgniter or content management systems like Expression Engine. Enabling this Apache function can be a pain in Leopard, and the guide I normally use needs a little bit of tweaking to get it working.
The first step is to modify the global Apache configuration file, located in /private/etc/apache2/httpd.conf, (make sure you back it up first). I recommend getting to the file using Textmate – its much easier than using those horrible Terminal text editors. The file needs to be edited around line 205, changing AllowOverride None to AllowOverride All.
# AllowOverride controls what directives may be placed in .htaccess files.# It can be "All", "None", or any combination of the keywords:# Options FileInfo AuthConfig LimitAllowOverride AllThe second step is to modify your own user account configuration – You can skip this step if you don’t host your files in the ~/Sites folder. The file is located in /private/etc/apache2/users/username.conf. The file needs to be edited right from the top.
<Directory "/Users/beseku/Sites/">Options Indexes FollowSymLinks MultiViewsAllowOverride All AuthConfigOrder allow,denyAllow from all</Directory>After making and saving these changes, (you’ll be asked for an administrator password when saving the files through Textmate), you'll need to open the Sharing system preference and restart ‘Web Sharing’, (by un-ticking then ticking the checkbox). If everything went well, Apache should start up again and you should have full mod_rewrite functionality.
The entry ‘Enabling .htaccess - Mac OS X 10.5’ was posted in the ‘long’ category on the 9th May, 2008.
There is one comment on this entry.
A randomly selected something that you might enjoy. I may have been involved with some of them.
There are a number of RSS feeds that you can subscribe to if you want to stay up to date with this site.
There is one comment on ‘Enabling .htaccess - Mac OS X 10.5&rsquo