4 August 2008 | 286 comments | url, urls, mod_rewrite, rewrite, rewriting, apache, htaccess, online marketing
A beginner's guide to URL rewriting, with plenty of examples.
30 June 2008 | 133 comments | apache, cheatsheet, mod_rewrite, reference, webdev
The second version of the mod_rewrite Cheat Sheet, a quick reference guide for mod_rewrite, with rewrite flags, regular expression syntax and sample rules.
14 September 2005 | 43 comments | howto, webdev, server, spam, referrer, wordpress, htaccess, admin, apache
Referrer spam is becoming increasingly common. At best, it will only render your log files useless. At worst, it can cause your site to be dropped by search engines and your running costs to skyrocket. Here's how to block spurious referrers.
A quick piece of code for you. If you are using mod_rewrite and creating RewriteRules for a website that emulate a directory structure, you might happen across the same problem I've had. If you have actual, real folders on the site as well, you don't want requests for items in those folders to be rewritten. You need a way to prevent the RewriteRule(s) matching the real folders. The easiest way to do this is (I think) by adding a RewriteRule for each of the real folders, like the below. This rule will match any request to those folders and prevent it being rewritten later in the set of rules.
RewriteRule ^folder_name/.*$ - [PT]
10 May 2005 | 179 comments | howto, webdev, mod_rewrite, development, server, cheatsheet, reference, programming, web, htaccess, apache
A quick reference guide for mod_rewrite, including server variables, flags and regular expression syntax. Also includes examples of commonly-used rules.
15 March 2005 | 99 comments | howto, webdev, security, programming, php, password, protect, sysadmin, htaccess, website, apache, directory, generator
A tutorial explaining how to retrict access to a directory on a web server using .htaccess.
11 May 2004 | 35 comments | development, http, reference, web, codes, status, apache, webdev, for beginners
All valid HTTP 1.1 Status Codes simply explained.
23 November 2003 | 34 comments | htaccess, apache, for beginners
Apache allows you to customize the server at the directory level, using .htaccess files. This tutorial explains how to use them to serve custom 404 error (page not found), and other common error pages, to your users.