How to set apache to skip a directory before a catch-all RewriteRule

Most of PHP applications use internal PHP routing (any MVC framework like ZF, CakePHP… , including wordpress) use a catch-all rewrite rule.

In case a directory needs to be ignored from that (to avoid broken urls falling back to that catch-all route), use a RewriteCond

 

#.htaccess. Redirect all the URLs to index.php, except the ones  starting with /admin

RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ index.php [NC,L]

Git pre-commit hook to check PHP syntax

Similarly to SVN, Git supports hook scripts. They are located under

<workcopy>/.git/hooks/

applypatch-msg.sample  post-update.sample     prepare-commit-msg.sample
commit-msg.sample      pre-applypatch.sample  pre-rebase.sample
post-commit.sample     pre-commit             update.sample
post-receive.sample    pre-commit.sample

To check the syntax before committing, I found an interesting script

https://github.com/ReekenX/git-php-syntax-checker/blob/master/pre-commit

Works great for me,

save into .git/hooks/pre-commit