WordPress.org

Ready to get started?Download WordPress

Forums

htaccess is killing my server loads... What will help? (12 posts)

  1. ryanc
    Member
    Posted 8 years ago #

    I posted about this earlier, but I wanted to see if you guys thought something might help.

    Background:
    My site gets about 1.7 million page views a week. I use worpress 2.01.

    Problem:
    The .htaccess file does rewrites that slowly build up the load on my server and gets behind and then just gets out of control. If I comment out this code:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    my server load goes down to 4 from 28 almost instantly and everything is cool in the world. However, that code must do some pretty important stuff as all of my WP links stop working when I do comment that stuff out...

    How can I fix it?
    Can I turn off some permalink setting or something of the like?

    OR

    Would Boren's alternative rewrite code help that you can find here: http://boren.nu/archives/2005/03/07/reduced-rewrite-plugin/

    Does that plugin even work in 2.0?

    Thanks in advanced, Ryan C.

  2. moshu
    Member
    Posted 8 years ago #

    If you are using the deafult settings for permalinks, why do you need a .htaccess file?

  3. ryanc
    Member
    Posted 8 years ago #

    Beats me... Under Options/Permalinks/Common Options I have "Date and name based" selected... Could this be my issue?

    If it would help, you can see the site here:

    http://www.jalopyjournal.com

  4. moshu
    Member
    Posted 8 years ago #

    Sorry, I was looking at the blog linked to your name - that one is using the default permalinks.

    For what you have at the jalopyjournal you do need the .htaccess. For everything else than the "default" setting you need .htaccess.

  5. ryanc
    Member
    Posted 8 years ago #

    So, If I go to Options/Permalinks/Common Options and select "default" all of my perforance issues dealing with htaccess should go away? Simple as that?

  6. moshu
    Member
    Posted 8 years ago #

    Well, I am not a server expert by any means. I just know WP doesn't need a .htaccess file if the default permalinks are set.

    Be aware, if people have links to your existing permalinks, e.g yourblog.com/2003/05/my-interesting-post and you change it to the default like yourblog.com/?p=345 they will all get a big 404 error.

    For site with that kind of traffic the gurus always recommend the WP-Cache plugin.

  7. ryanc
    Member
    Posted 8 years ago #

    Great. Thank you so much for your help. Where would I find that plugin for 2.0?

  8. moshu
    Member
    Posted 8 years ago #

    It should be among the Plugins in the Codex - if you can access it. [seems to be down]
    From there are also links to other places that host plugins.

  9. ryanc
    Member
    Posted 8 years ago #

    Uh oh... Couple of things.

    1. When I set it to "default" it says I should update .htaccess now. How do I do that?

    2. Secondly, I tried to just delete .htaccess thinking that would work. After I did, all of the wp pages I have failed to work... For example:
    http://www.jalopyjournal.com/propaganda

    returned a big 404 error.

  10. niziol
    Member
    Posted 8 years ago #

    Without permalinks, every page controlled by WP would be access via query-string (ie example.com/?p=44). Did your issues just start recently or have they always been lingering?

    Good luck,
    Michael.

  11. ryanc
    Member
    Posted 8 years ago #

    That makes sense... They started as soon as I went to two dedicated servers: one for html and one for mysql... I had to do that as 1 server couldn't keep up with me VB forum.

    So how do I update htaccess once I get this and all my links fixed up?

  12. niziol
    Member
    Posted 8 years ago #

    Re-update your permalinks to what you'd like them to be, and then you can paste what it spits out into your .htaccess file, which is probably fastest and easiest or you could make the .htaccess writable and let WP do the updating.

    If you need to create a new .htaccess file, just create a blank file (in something like Notepad or similar), paste in the code from WP and either save it as ".htaccess" or upload it and then name it to that. I hope this helps!

    Let us know if you need anymore help! :)

    Cheers,
    Michael.

Topic Closed

This topic has been closed to new replies.

About this Topic