I recently installed a WordPress blog in my localhost using Mac OS X’s built in Apache and PHP with MySQL to test a functionality when I decided to update the permalinks to use a different format other than the default setting. When I tested the new URL, I was greeted with the following error:
The requested URL /~user/wordpress/category/sample/ was not found on this server.
Apache/2.2.21 (Unix) DAV/2 PHP/5.3.10 with Suhosin-Patch Server at localhost Port 80
To fix this, create a file and name it
<username>.conf, where username is your user account’s short name. Paste the text below within the file:
Options Indexes MultiViews FollowSymLinks
AllowOverride All AuthConfig
Allow from all
Save the file and make sure it uses the
.conf extension. Copy the file to this location (you may need to provide your credentials to overwrite the current one):
Restart Apache to apply the changes by running the following in the Terminal:
sudo apachectl restart
Reapply your permalinks in the WordPress admin by choosing the default option and then setting it back to your desired format.