WordPress.org

Ready to get started?Download WordPress

Forums

Weird htaccess/mod_rewrite problem (17 posts)

  1. antifuse
    Member
    Posted 10 years ago #

    Umm... first thing I always try when doing this is replacing [QSA] with [R=permanent] just so I know where it's trying to redirect to... that way you can see what's wrong with your rewrite rule by where it's trying to redirect you.

  2. degerstrom
    Member
    Posted 10 years ago #

    I had the same problem. My Apache error log said
    Permission denied: /home/<user>/<path>/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    The error occured whether there was a .htaccess file in the directory or not. The error went away once I made the directory writeable for the web server process. Try
    Chmod 777 <wordpress directory>

  3. Cena
    Member
    Posted 10 years ago #

    You might also try a .htaccess with only the code generated by the permalinks page, and see if that works (looks like you used the example.htaccess as the base for your .htaccess.)

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    Chmod 777 ???
    That translates to "oh, please, please, please 0wn my server, mister script kiddie"

  5. antifuse
    Member
    Posted 10 years ago #

    Not really... still have to get an account that has some kind of access to that directory.

  6. Anonymous
    Unregistered
    Posted 10 years ago #

    I have a similar problem. With no .htaccess, all is well. With the usual .htaccess I use to set 1 year expire dates on image files, all is well. When I use the code wordpress spits out for my htaccess file, I receive a 403 error, whether the code is alone or accompanied with my other htaccess stuff.
    I tried antifuse's R=permanent suggestion, it did not help.
    I'm not going to chmod 777 anything. You should never have to do that. If there's a legitimate chmod needed for the server to do something it can't by default, fine, but everyone-everything is not an appropriate suggestion.
    I'm running on a redhat box using the ensim system, I don't recall any of the versions offhand but they're all fairly recent (php 4.2 or higher IIRC).
    The site is running under a subdirectory called 'weblog' and I was trying to set my 'pretty' links to something like /old/2003-12-31/this_is_a_test
    Does anyone have any ideas?

  7. TechGnome
    Moderator
    Posted 10 years ago #

    I had this problem once.... when trying to use mod_rewrite on a Windows server..... a shot in the dark, but what is the server running? Is it Linux/Unix or Windows?
    TG

  8. Cena
    Member
    Posted 10 years ago #

    Redhat is Linux.

  9. Anonymous
    Unregistered
    Posted 10 years ago #

    yeah, it's linux.
    And I checked in phpinfo(); and it says mod_rewrite is installed.
    Anyone have any ideas?

  10. kristin
    Member
    Posted 10 years ago #

    Not working for me either, and I know the mod_rewrite works because I used it for PostNuke on the same server

  11. kristin
    Member
    Posted 10 years ago #

    place this line at the begining of your .htaccess
    Options FollowSymLinks
    worked for me :)

  12. Chris J. Davis
    Member
    Posted 10 years ago #

    Well you need to make sure that your first line has no break.
    This:
    RewriteRule
    ^archives/....yada yada yada
    Should be this:
    RewriteRule ^archives/....yada yada yada
    Make sure there are no carriage returns or breaks in your rewrite rules, doing that fixed all my problems.

  13. Anonymous
    Unregistered
    Posted 10 years ago #

    chmod 755 httpdocs and it started working for me

  14. Anonymous
    Unregistered
    Posted 10 years ago #

    thanks kristin! that works for me.

  15. MathiasBynens
    Member
    Posted 10 years ago #

  16. Anonymous
    Unregistered
    Posted 9 years ago #

    Add :
    Options +FollowSymLinks
    to your .htaccess file.

  17. Anonymous
    Unregistered
    Posted 9 years ago #

    Well, what worked for me is to remove some extra spaces within the rules

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.