Posts Tagged htaccess
Redirect non-www to www (and vice-versa) via htaccess
Posted by Mike Beach in Uncategorized on September 30, 2011
This is probably old news for a lot of folks, but it’s handy nonetheless and I often have to look up these .htaccess strings. Note that Apache mod_rewrite is required for any of this to work. This (and it’s comments) are based on the Drupal default .htaccess file [License as of 9/30/11: GPL], because the Drupal [...]
How to block requests by referrer using .htaccess
Posted by Mike Beach in Uncategorized on April 30, 2011
There may be times you want to stop site visitors from clicking from a link on another site. This is called blocking the “referrer”, it’s also used to prevent image hot-linking. A “referrer” is another site that is linking to yours. When a user clicks on the link on the other site, they are considered [...]
Block access to your website via proxies using .htaccess
Posted by Mike Beach in Uncategorized on April 19, 2011
If you’re a webmaster, you may want to block access to your site via proxies. While you could do this by blocking the proxy domains individually, there are thousands upon thousands of proxies and more popping up all the time. Rather than block them individually, you can easily block the HTTP headers that [properly behaving] [...]
Redirect or deny site visitors based on IP using .htaccess
Posted by Mike Beach in Uncategorized on April 17, 2011
As a webmaster, there may be times when you want to deny one or more IP addresses or ranges from accessing your website. Be it comment spammers, page scrapers, or various other reasons. For that, you’re welcome to adopt the following code snippets. If you’ve found them helpful, or have something to share, please do [...]
Bad robots
Posted by Mike Beach in Uncategorized on November 20, 2010
As part of being on a VPS, bandwidth is limited. One of the things you have to watch for is bots, crawlers, and scrapers coming and stealing your content and bandwidth. Some of these bots are good and helpful, like the Google, Yahoo, and Bing crawlers. They index your site so it will appear in [...]
Optimizing WordPress
Posted by Mike Beach in Uncategorized on July 4, 2010
So after my little fiasco with plug-ins and CPU throttling, I’ve been looking for ways to make WordPress at least a little lighter and faster. I’m not going to cover disabling plug-ins, I’m going to go over a few other ways, starting with … Disabling revisions: Every time a post is edited and/or published, a [...]


Recent Comments