RewriteRule ^ajax\.(.*).php$ ajax/$1.php [NC,R=301]
Any request to yourwebsite.com/ajax.whatever.php will change to yourwebsite.com/ajax/whatever.php ok?
If u want their browser to show the original ajax.whatever.php u can remove the R=301 which is telling the browser to change it's address. Also the NC is for Not Caps sensitive, I assume u would want that. If u wanna rewrite everything (not just .php) remove the .php twice is all u gotta do