# File: .htaccess # Last modified 15 Oct 2009 # Developed as a part of a free, collaborative PHP framework # # http://phramework.wordpress.com # # Code may be used free of charge in both commercial and non-commercial # projects as long as this notice appears in all source code. # # For the latest terms of use see # # http://phramework.wordpress.com/terms-of-use/ RewriteEngine On #match for at least one page with any number of directories (zero or more) RewriteRule ^([a-z0-9_-]+)((\/[a-z0-9_-]+)*)$ index.php?page=$1$2 [NC,L,QSA] #match for at least one directory with a trailing slash (/) - equivalent to above with /main ending RewriteRule ^([a-z0-9_-]+)((\/[a-z0-9_-]+)*)\/$ index.php?page=$1$2/main [nc,L,QSA]