WordPress .htaccess tips
Controlling how URLs behave and who access your site rely on the .htaccess file, and while some of the things it can do have a comfortable interface inside WordPress, there’s so much more to explore. WP Shout goes from A to Z of those possibilities.
For example: if you need to stop spambots, try denying no-referrer requests with this code:
RewriteEngine On RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} .wp-comments-post\.php* RewriteCond %{HTTP_REFERER} !.*yourblog.com.* [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
Need to study the somewhat cryptic .htaccess language further? Head over to Apache’s official documentation.
Related Posts
- Previous post: WordPress admin toolbar bookmarklet
- Next post: New date for WordCamp Philippines 2010



