Category Archive: .htaccess
Posts about Apache and .htaccess
Here is a quick cheat-sheet for redirecting URLs with .htaccess.
For WordPress users there are at least three great plugins that make maintenance mode just dead-simple. Even so, here is how to do it with .htaccess.
.htaccess enables us to easily clean up 404 errors and other misdirected HTTP traffic for better SEO. Here are some canonical snippets for WordPress and beyond.
Here is how to redirect specific URL requests to a PHP script for further processing, etc. Very useful for monitoring HTTP activity, logging errors, and more.
In addition to www canonicalization, you can also canonicalize the HTTP protocol, redirecting HTTP to HTTPS (or vice versa) using Apache/.htaccess. Below you will find several ways to force SSL/TLS for all URI requests. This is especially useful for sites with existing links pointing to unencrypted http:// URLs. Enforcing use of SSL/HTTPS helps to eliminate […]
Devices and bots are often searching for different versions of the Apple Touch Icon. Here is a quick slice of .htaccess to redirect all apple-icon requests to apple.png.
When developing sites, an easy way to keep things private is to use .htaccess to restrict access based on IP address.
Need to redirect your feeds to FeedBurner? Here’s how to do it with a thin slice of .htaccess.
Here’s a handy .htaccess snippet for canonicalizing URLs by removing the “www”, “index.php”, and “index.html” from all requests.
Another effective trap for bad bots and spammers, built with PHP and a slice of .htaccess.
Quick snippet today that you can add to your .htaccess file to block some common XSS (cross-site scripting) attacks.