WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Is 61k to big for an .htaccess (7 posts)

  1. Glenn Ansley
    Member
    Posted 7 years ago #

    My site has been averaging about 500 page views a day.
    I'm thinking about putting 800 301's for specific posts into the .htaccess. Is this wise? Thanks.

  2. JeremyVisser
    Member
    Posted 7 years ago #

    Well, you could always put the redirects in a file called .redirects, and use an "Include .redirects" type directive in .htaccess to easily revert it.

  3. Glenn Ansley
    Member
    Posted 7 years ago #

    I guess I was more concerned with how much strain it would put on my server more than where exactly the redirects were stored. I actually went ahead and did this last night with 1400 lines and 120kb... no signs of crashing yet. Is this a bad idea?

  4. Chris_K
    Member
    Posted 7 years ago #

    As long as you don't have a low bandwidth limit...

    I'm curious about the "why" of it; how come so many redirects?

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    If you're doing lots and lots of very similar redirects, yes, having them as separate RewriteRules in htaccess will impact server performance.

    Look into using a RewriteMap instead. It does require a little more thought to make it work, however the map itself is loaded into memory and stays there until it changes, making the lookups happen in a fraction of the time and the rewrite rule itself not use so much server time for processing.

  6. Glenn Ansley
    Member
    Posted 7 years ago #

    Thanks for your replies:

    Handy: My rewrites are an attempted solution to this problem. I am trying to eliminate all the 404's that google is finding.

    Otto: I looked into those but I'm not to proficient at at Rewrites and I had my doubts as to whether a map would work because of the problem I had (referenced in the link above). The problem is that I'm redirecting multiple posts from a single category (as far as google was concerned) to multiple categories.

    I'm guess I'm content with this unless: A) My site goes down because of server load or B) Some sort of RewriteMap is possible.

    Thanks though!

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    A RewriteMap is always possible. But definitely read up on the topic as it's not always straightforward and obvious.

Topic Closed

This topic has been closed to new replies.

About this Topic