This post is not about URL Rewriting. It is mostly about how to post mod rewrite sources on your blog. My blog is working on SyntaxHighlighter Evolved by Aleksey Gorbachev highlighter so I’ve wrote a simple extension for it. I hope you will find the way to add it to your blog (it’s not so difficult), if not – don’t hesitate to ask me :) I did it once. So here are regular expressions for highlighting mod rewrite.
I will use this extension in my later posts about mod rewrite. Here an example of how it works
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]