Arrow

Peter's & WP Super Cache | Peter's Custom Anti-Spam for WordPress | Forum

Back to the custom anti-spam plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Peter's & WP Super Cache
December 17, 2007
4:38 am
Rick
Guest

Hi, I love your plugin and have been using it for a while. Recently I installed WP Super Cache to deal with some problems I'm having, and have just noticed today that when a page gets cached, the capcha image no longer displays, and clicking for audio just sends me back to my home page. I hate this, don't want to have to decide between these two great plugins. Any advice?

December 17, 2007
2:36 pm
Peter
Admin
Forum Posts: 841
Offline

Try using re-write rules -- maybe it'll fool WP Super Cache to either not cache the image and audio or think they're separate pages:

1) Find the lines that link to the audio file and that load the image file and replace them with the following:

if ($cas_mp3) echo( '<a href="' . $cas_myurl . '/audioselect/' . $cas_rowid . '" title="Hear an audio file of the anti-spam image">' );
echo( '<img src="' . $cas_myurl . '/antiselect/' . $cas_rowid . "\\"\\n\\t\\t\\t\\t" );</code>

2) Add a rewrite rule to the .htaccess file in the root of your blog:

RewriteEngine On
RewriteRule ^antiselect/(.+)$ index.php?antiselect=$1 [L]
RewriteRule ^audioselect/(.+)$ index.php?audioselect=$1 [L]

January 5, 2008
12:21 am
Rick
Guest

Hi. Sorry it took so long to reply but I've been away for a few weeks. Tried it and yep, it worked. Yeah! I had to put the two RewriteRules just before 'WP Super Cache's' rules. I haven't tried it yet but my guess is I'll have to reenter these rules if I turn Super Cache off then on. I wonder if I can implement these rules thru the 'Redirection' plugin? Will have to try that some day. Anyway, thank you very much.