WordPress.org

Ready to get started?Download WordPress

Forums

mod_rewrite makes me want to cry (10 posts)

  1. masonchumpia
    Member
    Posted 9 years ago #

    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?

  2. EyeNo
    Member
    Posted 9 years ago #

    I had the same type of problem and found some answers here:

    http://codex.wordpress.org/Using_Permalinks

    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.

  3. masonchumpia
    Member
    Posted 9 years ago #

    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!

  4. bpolhemus
    Member
    Posted 9 years ago #

    Stupid question:

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

  5. masonchumpia
    Member
    Posted 9 years ago #

    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.

  6. Arlo
    Member
    Posted 9 years ago #

    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.

    Ideas?

  7. masonchumpia
    Member
    Posted 9 years ago #

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

  8. Arlo
    Member
    Posted 9 years ago #

    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)

  9. iand
    Member
    Posted 9 years ago #

    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
    </Directory>
    (and restart apache).
    Of your path may be different.

  10. Arlo
    Member
    Posted 9 years ago #

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


    <Directory "/">
    Options FollowSymLinks
    AllowOverride None
    </Directory>

    All I had to do was change the "none" to "All"

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.