Support » Fixing WordPress » MAMP 404/"server error" when loading permalinks

  • Edit: Wow. Just took a look a the PHP error log and found it was throwing a fit over this string:

    <p><em><?php the_time(‘l, F jS, Y’); ?></em></p>

    Removing that magically fixed everything. Disregard the below, I guess.


    This has been driving me crazy for hours.

    I’m building a site on an install of WP on MAMP, and everything has been great save any attempt at loading a post permalink (pages are fine) results in a 404 or server error:

    Server error
    The website encountered an error while retrieving http://tpc.local/?p=1. It may be down for maintenance or configured incorrectly.
    Here are some suggestions:
    Reload this webpage later.
    HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

    I’ve looked all over and tried dozens of different changes to httpd.conf and .htaccess, all to no avail. Things I have tried:

    – mod_rewrite is uncommented.
    – <Directory /> contains “Options Indexes FollowSymLinks” and “AllowOverride All”.
    – .htaccess is writable. Adding “Options +FollowSymLinks” under “<IfModule mod_rewrite.c>” does nothing that I can tell.
    – I’m using a vhost, which looks like this:

    <VirtualHost *:80>
    DocumentRoot “/Applications/MAMP/tpc”
    ServerName tpc.local
    DirectoryIndex index.php index.html
    <Directory “/Applications/MAMP/tpc”>
    AllowOverride All
    Options -Indexes +FollowSymLinks
    Order allow,deny
    Allow from all

    – vhost exists in its own directory as you can see above, /MAMP/tpc. I was also having this problem before when my wordpress was in a subdirectory within htdocs.
    – in phpmyadmin, the “site url” and “home” tables direct to the vhost correctly.
    – all instances of “AllowOverride” are set to “All”.

    I have tried default permalinks and all other varieties.

    I’ve been at this for going on six hours and I’m starting to lose hope.

  • The topic ‘MAMP 404/"server error" when loading permalinks’ is closed to new replies.