Cookies for Comments
[resolved] nginx rewrite rule for cookies for comments. Anyone? (2 posts)

  1. Lee H
    Posted 4 years ago #

    In the description there's these awesome Apache rewrite rules posted that drastically cut down on splog and user signups.

    Since moving servers and going with nginx (which I can confirm makes WP fly), I've been pummeled with bots creating splogs and user sign ups. I just can't keep up with them.

    My Apache rewrite rule skills are weak at best, even after all these years, and this new nginx way of rewriting hasn't even began to sink into my skull.

    Any kind souls able to convert this Apache rule to nginx?

    RewriteRule ^wp-signup.php - [F,L]


  2. Lee H
    Posted 4 years ago #

    Well that wasn't so hard.
    I ended up making a location for wp-signup.php and wp-register.php.
    If the comments for cookies cookie isn't set, a 403 Forbidden is returned.
    Sweet :)

    location ~ \wp-(signup|register).php$ {
    			return 403;
    		# Adjust for your setup
    		include fastcgi_params;
    		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    		fastcgi_pass php;

    If anyone knows a better way... I'm all ears!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cookies for Comments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic