Here is a collection of useful .htaccess snippets.  Some I have used on sites and others I think were useful enough to share on this post.

WordPress's Default .htaccess file.

Here is a good security snippet to add to your .htaccess file.

Custom Error Documents.

Protecting a file or directory.

Password protecting

Leverage Caching through the .htaccess

The following is an example of how to block attempted Spam Refererring Websites from getting to your site.

To redirect your domain from the non www version to the www version.

Page Redirects.  Regular Expression can be used when matching pages for redirects.

Misc htaccess settings.

A lot of these hosting places like MangeWP will handle these for you.  They handle the security and are strictly WordPress hosting.  They handle the caching and directory protection.  Give them a try.

%d bloggers like this: