Support » How-To and Troubleshooting » mod_rewrite makes me want to cry

mod_rewrite makes me want to cry

  • Not tears of joy, I assure you. I’ve been wrestling with my local Apache 1.3 installation for the last three hours trying to get clean permalinks to work. I had absolutely no knowledge prior concerning mod_rewrite, so I consulted the guide located at http://www.sitepoint.com/article/guide-url-rewriting/. I started off by uncommenting #LoadModule rewrite_module modules/mod_rewrite.so and #AddModule mod_rewrite.c in the httpd.conf as instructed. Then I restarted the server. I had an .htaccess generated when I set permalinks options (WP 1.5 installation). When I follow permalinks in my WordPress template, I get a 404 error. What’s going on?

Viewing 9 replies - 1 through 9 (of 9 total)
  • I had the same type of problem and found some answers here:


    Something about the host not reporting that Apache was installed or words to that effect. (see the bottom section). Followed the steps and life is good again.

    Unfortunately, this does not resolve the issue. I doubt this is the problem because I have no problem generating an actual .htaccess. I’m at wit’s end about this. I’m trying to use Smart Archives, but I can’t even get my permalinks in order!

    Stupid question:

    You DID restart Apache after modifying the config files, didn’t you?

    Yes. Apache has been restarted many times. I’m not exactly sure behind the workings, though. After I’ve uncommented the appropriate lines in httpd.conf, is mod_rewrite supposed to kick in after it sees URL rewrite rules in the .htaccess? Or is there some other configuring that is necessary? The .htaccess is currently located at http://localhost/wordpress, by the way, if that is important.

    I’m having the same problem, but mod_rewrite IS working fine; it works in my menalto gallery install, but although WP is correctly populating the .htaccess file in my index.php root, the permalinks aren’t being recognized. FWIW, I have my index.php at my file root, not in the wp dir, if that makes any difference.


    Sweet Christmas, all I wanted was clean URLs. Is that so much to ask?!

    I’ve discovered mod_rewrite DOES work when I’m using the /wordpress/index.php. But when I switch to having the index in my file root, .htaccess is ignored (and yes, I have reapplied the rules, and WP is correctly populating the /root/.htaccess file)

    This might just be an OS X thing, but to get nice permalinks on my local install I had to add the following my username.conf file:
    <Directory "/Library/Webserver/Documents/yourWPfolder">
    Options FollowSymLinks
    AllowOverride All
    (and restart apache).
    Of your path may be different.

    AH! That fixed it! I had that line in my http.conf as:

    <Directory "/">
    Options FollowSymLinks
    AllowOverride None

    All I had to do was change the “none” to “All”


Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘mod_rewrite makes me want to cry’ is closed to new replies.
Skip to toolbar