WP Super Cache
Htaccess redirect 500 errors to cached version of page (7 posts)

  1. jozwikjp
    Posted 2 years ago #


    I have a site that gets a high amount of traffic during specific times of the week. The site is on a shared hosting that will return a error 500 if too many concurrent connections are made. I was wondering if it is possible to redirect those users to a cached version of the page in the situation?


  2. TheScienceRoom
    Posted 2 years ago #

    I think I'm having the same problem. When many of my students are interacting with my site, I get the Internal Server error as well. We have been eliminating plugins one by one and it does seem like it is WP Super Cache (from my shared server support):

    "It appears that you are using the WP Supercache plugin, and this plugin is writing 1 invalid line of code to the .htaccess, causing the internal server error."

    Is there a fix? I've deleted the plugin for now, but would really like to keep using it in the future.


  3. Donncha O Caoimh
    Plugin Author

    Posted 2 years ago #

    What's the invalid line of code?

    jozwikjp - If you have Apache keepalive turned on then switch it off.

  4. jozwikjp
    Posted 2 years ago #

    Hello Donncha,
    I ended up moving the site to a VPS where I had more control. The site was actually a auction event so cache content for users that are logged in is not really a option. My client opted for more dynamic solution of more hardware :-) Thank you for your hard work.

  5. TheScienceRoom
    Posted 2 years ago #

    I don't know what the line of code was because it was deleted, but I also know that the same Apache Rewrite commands were copying themselves over and over. I'll see if I can find anything else in the meantime.

  6. Donncha O Caoimh
    Plugin Author

    Posted 2 years ago #

    TheScienceRoom - you could always just use PHP mode, it's near enough as fast as mod_rewrite to not make any difference.

  7. TheScienceRoom
    Posted 2 years ago #

    Hi there!
    I still haven't been able to figure out what the invalid code was when using the mod_rewrite mode, but I tried the PHP mode and it crashed as well (took about 2 weeks this time before serving up a 500 error).

    This time it appears the main wordpress section in the .htaccess had 2 lines put into one.

    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    The above 2 lines were written as the following.

    RewriteBase / RewriteRule ^index\.php$ - [L]

    Any ideas on how to prevent this from happening?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic