OK we've seen your file, now we need to know what is wrong. Please review my explanations of what each line does above.
It works like this
REQUEST FOR directory/alabama comes in
The first rule that applies is your new rule:
RewriteRule ^directory/alabama/$ /index.php?p=21
NOTE: because you have both ^ and $ bracking your url in there, it has to match EXACTLY. If the user doesn't provide the trailing slash, it won't match. if they try /xyz/directory/alabama/ it won't apply. they have to ask exactly for http://example.com/directory/alabama/ (with trailing slash). You might want to try leaving off that $ char.
IF your rule is applied because the user has asked for directory/alabama/ and not a character more or a character less then your rule is applied, which takes whatever they asked for and replaces it with /index.php?p=21.
NOW -- and this is important to realize -- that evaluation does not stop at this point because your directive is not followed by an [L] flag. Evaluation continues to the next line. And, forgive me, but I'm not sure if %{REQUEST_FILENAME} is changed by your rule being applied. You might try putting the [L] after your rule.